summaryrefslogtreecommitdiffstats
path: root/googletest/test/gtest_json_test_utils.py
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@google.com>2023-01-25 17:13:35 (GMT)
committerCopybara-Service <copybara-worker@google.com>2023-01-25 17:14:26 (GMT)
commitd1ad27e0a4ba67161f554da25c5f281ec1e94c44 (patch)
treef78137b634cfea8b9d9037b36a42413d8f9bef4d /googletest/test/gtest_json_test_utils.py
parent6c65a1ca359052e9fd671b550fe748056be74af6 (diff)
downloadgoogletest-d1ad27e0a4ba67161f554da25c5f281ec1e94c44.zip
googletest-d1ad27e0a4ba67161f554da25c5f281ec1e94c44.tar.gz
googletest-d1ad27e0a4ba67161f554da25c5f281ec1e94c44.tar.bz2
Fix formatting in subset of Python files
These files were formatted with automated tools. The remaining Python files require some manual fix ups, so they will be fixed separately. PiperOrigin-RevId: 504579820 Change-Id: I3923bd414bffe3ded6163ec496cd09ace3951928
Diffstat (limited to 'googletest/test/gtest_json_test_utils.py')
-rw-r--r--googletest/test/gtest_json_test_utils.py2
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):