summaryrefslogtreecommitdiffstats
path: root/googletest/test/googletest-json-outfiles-test.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/googletest-json-outfiles-test.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/googletest-json-outfiles-test.py')
-rw-r--r--googletest/test/googletest-json-outfiles-test.py146
1 files changed, 60 insertions, 86 deletions
diff --git a/googletest/test/googletest-json-outfiles-test.py b/googletest/test/googletest-json-outfiles-test.py
index 3abf355..bc17fe2 100644
--- a/googletest/test/googletest-json-outfiles-test.py
+++ b/googletest/test/googletest-json-outfiles-test.py
@@ -40,93 +40,65 @@ GTEST_OUTPUT_1_TEST = 'gtest_xml_outfile1_test_'
GTEST_OUTPUT_2_TEST = 'gtest_xml_outfile2_test_'
EXPECTED_1 = {
- u'tests':
- 1,
- u'failures':
- 0,
- u'disabled':
- 0,
- u'errors':
- 0,
- u'time':
- u'*',
- u'timestamp':
- u'*',
- u'name':
- u'AllTests',
- u'testsuites': [{
- u'name':
- u'PropertyOne',
- u'tests':
- 1,
- u'failures':
- 0,
- u'disabled':
- 0,
- u'errors':
- 0,
- u'time':
- u'*',
- u'timestamp':
- u'*',
- u'testsuite': [{
- u'name': u'TestSomeProperties',
- u'file': u'gtest_xml_outfile1_test_.cc',
- u'line': 41,
- u'status': u'RUN',
- u'result': u'COMPLETED',
- u'time': u'*',
- u'timestamp': u'*',
- u'classname': u'PropertyOne',
- u'SetUpProp': u'1',
- u'TestSomeProperty': u'1',
- u'TearDownProp': u'1',
+ 'tests': 1,
+ 'failures': 0,
+ 'disabled': 0,
+ 'errors': 0,
+ 'time': '*',
+ 'timestamp': '*',
+ 'name': 'AllTests',
+ 'testsuites': [{
+ 'name': 'PropertyOne',
+ 'tests': 1,
+ 'failures': 0,
+ 'disabled': 0,
+ 'errors': 0,
+ 'time': '*',
+ 'timestamp': '*',
+ 'testsuite': [{
+ 'name': 'TestSomeProperties',
+ 'file': 'gtest_xml_outfile1_test_.cc',
+ 'line': 41,
+ 'status': 'RUN',
+ 'result': 'COMPLETED',
+ 'time': '*',
+ 'timestamp': '*',
+ 'classname': 'PropertyOne',
+ 'SetUpProp': '1',
+ 'TestSomeProperty': '1',
+ 'TearDownProp': '1',
}],
}],
}
EXPECTED_2 = {
- u'tests':
- 1,
- u'failures':
- 0,
- u'disabled':
- 0,
- u'errors':
- 0,
- u'time':
- u'*',
- u'timestamp':
- u'*',
- u'name':
- u'AllTests',
- u'testsuites': [{
- u'name':
- u'PropertyTwo',
- u'tests':
- 1,
- u'failures':
- 0,
- u'disabled':
- 0,
- u'errors':
- 0,
- u'time':
- u'*',
- u'timestamp':
- u'*',
- u'testsuite': [{
- u'name': u'TestSomeProperties',
- u'file': u'gtest_xml_outfile2_test_.cc',
- u'line': 41,
- u'status': u'RUN',
- u'result': u'COMPLETED',
- u'timestamp': u'*',
- u'time': u'*',
- u'classname': u'PropertyTwo',
- u'SetUpProp': u'2',
- u'TestSomeProperty': u'2',
- u'TearDownProp': u'2',
+ 'tests': 1,
+ 'failures': 0,
+ 'disabled': 0,
+ 'errors': 0,
+ 'time': '*',
+ 'timestamp': '*',
+ 'name': 'AllTests',
+ 'testsuites': [{
+ 'name': 'PropertyTwo',
+ 'tests': 1,
+ 'failures': 0,
+ 'disabled': 0,
+ 'errors': 0,
+ 'time': '*',
+ 'timestamp': '*',
+ 'testsuite': [{
+ 'name': 'TestSomeProperties',
+ 'file': 'gtest_xml_outfile2_test_.cc',
+ 'line': 41,
+ 'status': 'RUN',
+ 'result': 'COMPLETED',
+ 'timestamp': '*',
+ 'time': '*',
+ 'classname': 'PropertyTwo',
+ 'SetUpProp': '2',
+ 'TestSomeProperty': '2',
+ 'TearDownProp': '2',
}],
}],
}
@@ -139,8 +111,9 @@ class GTestJsonOutFilesTest(gtest_test_utils.TestCase):
# We want the trailing '/' that the last "" provides in os.path.join, for
# telling Google Test to create an output directory instead of a single file
# for xml output.
- self.output_dir_ = os.path.join(gtest_test_utils.GetTempDir(),
- GTEST_OUTPUT_SUBDIR, '')
+ self.output_dir_ = os.path.join(
+ gtest_test_utils.GetTempDir(), GTEST_OUTPUT_SUBDIR, ''
+ )
self.DeleteFilesAndDir()
def tearDown(self):
@@ -169,8 +142,9 @@ class GTestJsonOutFilesTest(gtest_test_utils.TestCase):
def _TestOutFile(self, test_name, expected):
gtest_prog_path = gtest_test_utils.GetTestExecutablePath(test_name)
command = [gtest_prog_path, '--gtest_output=json:%s' % self.output_dir_]
- p = gtest_test_utils.Subprocess(command,
- working_dir=gtest_test_utils.GetTempDir())
+ p = gtest_test_utils.Subprocess(
+ command, working_dir=gtest_test_utils.GetTempDir()
+ )
self.assertTrue(p.exited)
self.assertEqual(0, p.exit_code)