diff options
author | Tom Hughes <tomhughes@google.com> | 2023-01-25 17:13:35 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-01-25 17:14:26 (GMT) |
commit | d1ad27e0a4ba67161f554da25c5f281ec1e94c44 (patch) | |
tree | f78137b634cfea8b9d9037b36a42413d8f9bef4d /googlemock/test | |
parent | 6c65a1ca359052e9fd671b550fe748056be74af6 (diff) | |
download | googletest-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 'googlemock/test')
-rwxr-xr-x | googlemock/test/gmock_leak_test.py | 55 | ||||
-rwxr-xr-x | googlemock/test/gmock_output_test.py | 12 |
2 files changed, 40 insertions, 27 deletions
diff --git a/googlemock/test/gmock_leak_test.py b/googlemock/test/gmock_leak_test.py index 9d142d3..8b02bc4 100755 --- a/googlemock/test/gmock_leak_test.py +++ b/googlemock/test/gmock_leak_test.py @@ -54,50 +54,59 @@ class GMockLeakTest(gmock_test_utils.TestCase): def testCatchesLeakedMockByDefault(self): self.assertNotEqual( 0, - gmock_test_utils.Subprocess(TEST_WITH_EXPECT_CALL, - env=environ).exit_code) + gmock_test_utils.Subprocess( + TEST_WITH_EXPECT_CALL, env=environ + ).exit_code, + ) self.assertNotEqual( - 0, - gmock_test_utils.Subprocess(TEST_WITH_ON_CALL, - env=environ).exit_code) + 0, gmock_test_utils.Subprocess(TEST_WITH_ON_CALL, env=environ).exit_code + ) def testDoesNotCatchLeakedMockWhenDisabled(self): self.assertEqual( 0, - gmock_test_utils.Subprocess(TEST_WITH_EXPECT_CALL + - ['--gmock_catch_leaked_mocks=0'], - env=environ).exit_code) + gmock_test_utils.Subprocess( + TEST_WITH_EXPECT_CALL + ['--gmock_catch_leaked_mocks=0'], + env=environ, + ).exit_code, + ) self.assertEqual( 0, - gmock_test_utils.Subprocess(TEST_WITH_ON_CALL + - ['--gmock_catch_leaked_mocks=0'], - env=environ).exit_code) + gmock_test_utils.Subprocess( + TEST_WITH_ON_CALL + ['--gmock_catch_leaked_mocks=0'], env=environ + ).exit_code, + ) def testCatchesLeakedMockWhenEnabled(self): self.assertNotEqual( 0, - gmock_test_utils.Subprocess(TEST_WITH_EXPECT_CALL + - ['--gmock_catch_leaked_mocks'], - env=environ).exit_code) + gmock_test_utils.Subprocess( + TEST_WITH_EXPECT_CALL + ['--gmock_catch_leaked_mocks'], env=environ + ).exit_code, + ) self.assertNotEqual( 0, - gmock_test_utils.Subprocess(TEST_WITH_ON_CALL + - ['--gmock_catch_leaked_mocks'], - env=environ).exit_code) + gmock_test_utils.Subprocess( + TEST_WITH_ON_CALL + ['--gmock_catch_leaked_mocks'], env=environ + ).exit_code, + ) def testCatchesLeakedMockWhenEnabledWithExplictFlagValue(self): self.assertNotEqual( 0, - gmock_test_utils.Subprocess(TEST_WITH_EXPECT_CALL + - ['--gmock_catch_leaked_mocks=1'], - env=environ).exit_code) + gmock_test_utils.Subprocess( + TEST_WITH_EXPECT_CALL + ['--gmock_catch_leaked_mocks=1'], + env=environ, + ).exit_code, + ) def testCatchesMultipleLeakedMocks(self): self.assertNotEqual( 0, - gmock_test_utils.Subprocess(TEST_MULTIPLE_LEAKS + - ['--gmock_catch_leaked_mocks'], - env=environ).exit_code) + gmock_test_utils.Subprocess( + TEST_MULTIPLE_LEAKS + ['--gmock_catch_leaked_mocks'], env=environ + ).exit_code, + ) if __name__ == '__main__': diff --git a/googlemock/test/gmock_output_test.py b/googlemock/test/gmock_output_test.py index d7c3f27..7c24d68 100755 --- a/googlemock/test/gmock_output_test.py +++ b/googlemock/test/gmock_output_test.py @@ -39,7 +39,7 @@ gmock_output_test.py """ -from io import open # pylint: disable=redefined-builtin, g-importing-member +from io import open # pylint: disable=redefined-builtin, g-importing-member import os import re import sys @@ -168,9 +168,13 @@ class GMockOutputTest(gmock_test_utils.TestCase): # The raw output should contain 2 leaked mock object errors for # test GMockOutputTest.CatchesLeakedMocks. - self.assertEqual(['GMockOutputTest.CatchesLeakedMocks', - 'GMockOutputTest.CatchesLeakedMocks'], - leaky_tests) + self.assertEqual( + [ + 'GMockOutputTest.CatchesLeakedMocks', + 'GMockOutputTest.CatchesLeakedMocks', + ], + leaky_tests, + ) if __name__ == '__main__': |