diff options
Diffstat (limited to 'googletest/test/gtest_json_test_utils.py')
-rw-r--r-- | googletest/test/gtest_json_test_utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/googletest/test/gtest_json_test_utils.py b/googletest/test/gtest_json_test_utils.py index f62896c..86a5925 100644 --- a/googletest/test/gtest_json_test_utils.py +++ b/googletest/test/gtest_json_test_utils.py @@ -42,6 +42,7 @@ def normalize(obj): Normalized output without any references to transient information that may change from run to run. """ + def _normalize(key, value): if key == 'time': return re.sub(r'^\d+(\.\d+)?s$', '*', value) @@ -54,6 +55,7 @@ def normalize(obj): return re.sub(r'^.*[/\\](.*)', '\\1', value) else: return normalize(value) + if isinstance(obj, dict): return {k: _normalize(k, v) for k, v in obj.items()} if isinstance(obj, list): |