summaryrefslogtreecommitdiffstats
path: root/googletest
diff options
context:
space:
mode:
authorDino Radakovic <dinor@google.com>2023-08-15 14:59:51 (GMT)
committerCopybara-Service <copybara-worker@google.com>2023-08-15 15:00:31 (GMT)
commitdd9a9569041c1551613d116ff0d092b356c836b1 (patch)
treece72535d8417e6205bb3a404af9de9bd32d3c9f2 /googletest
parent6513d0272d8bd2062cf4549fe2b0adb1fc862486 (diff)
downloadgoogletest-dd9a9569041c1551613d116ff0d092b356c836b1.zip
googletest-dd9a9569041c1551613d116ff0d092b356c836b1.tar.gz
googletest-dd9a9569041c1551613d116ff0d092b356c836b1.tar.bz2
gtest_help_test: Make method names `snake_case`, conforming with [the style guide](https://google.github.io/styleguide/pyguide#316-naming)
PiperOrigin-RevId: 557133618 Change-Id: I27202ee91ee81b3d2e4c28102190d2bde8efba05
Diffstat (limited to 'googletest')
-rwxr-xr-xgoogletest/test/gtest_help_test.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/googletest/test/gtest_help_test.py b/googletest/test/gtest_help_test.py
index 3f78496..b3b740d 100755
--- a/googletest/test/gtest_help_test.py
+++ b/googletest/test/gtest_help_test.py
@@ -96,7 +96,7 @@ HELP_REGEX = re.compile(
)
-def RunWithFlag(flag):
+def run_with_flag(flag):
"""Runs gtest_help_test_ with the given flag.
Returns:
@@ -116,14 +116,14 @@ def RunWithFlag(flag):
class GTestHelpTest(gtest_test_utils.TestCase):
"""Tests the --help flag and its equivalent forms."""
- def testPrintsHelpWithFullFlag(self):
+ def test_prints_help_with_full_flag(self):
"""Verifies correct behavior when help flag is specified.
The right message must be printed and the tests must
skipped when the given flag is specified.
"""
- exit_code, output = RunWithFlag('--help')
+ exit_code, output = run_with_flag('--help')
if HAS_ABSL_FLAGS:
# The Abseil flags library prints the ProgramUsageMessage() with
# --help and returns 1.
@@ -143,25 +143,25 @@ class GTestHelpTest(gtest_test_utils.TestCase):
else:
self.assertNotIn(DEATH_TEST_STYLE_FLAG, output)
- def testRunsTestsWithoutHelpFlag(self):
+ def test_runs_tests_without_help_flag(self):
"""Verifies correct behavior when no help flag is specified.
Verifies that when no help flag is specified, the tests are run
and the help message is not printed.
"""
- exit_code, output = RunWithFlag(None)
+ exit_code, output = run_with_flag(None)
self.assertNotEqual(exit_code, 0)
self.assertFalse(HELP_REGEX.search(output), output)
- def testRunsTestsWithGtestInternalFlag(self):
+ def test_runs_tests_with_gtest_internal_flag(self):
"""Verifies correct behavior when internal testing flag is specified.
Verifies that the tests are run and no help message is printed when
a flag starting with Google Test prefix and 'internal_' is supplied.
"""
- exit_code, output = RunWithFlag(INTERNAL_FLAG_FOR_TESTING)
+ exit_code, output = run_with_flag(INTERNAL_FLAG_FOR_TESTING)
self.assertNotEqual(exit_code, 0)
self.assertFalse(HELP_REGEX.search(output), output)