From 6c65a1ca359052e9fd671b550fe748056be74af6 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 25 Jan 2023 08:31:33 -0800 Subject: [PATCH] Replace numeric lints with their string equivalent PiperOrigin-RevId: 504570278 Change-Id: Iab9c988b3a781eaafbdd97c924a74c2269125799 --- googletest/test/googletest-filter-unittest.py | 8 ++++---- googletest/test/gtest_test_utils.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/googletest/test/googletest-filter-unittest.py b/googletest/test/googletest-filter-unittest.py index 02fd1dfb..6b235181 100755 --- a/googletest/test/googletest-filter-unittest.py +++ b/googletest/test/googletest-filter-unittest.py @@ -285,13 +285,13 @@ class GTestFilterUnitTest(gtest_test_utils.TestCase): # into a process using the environment variable. However, we can still # test the case when the variable is not supplied (i.e., gtest_filter is # None). - # pylint: disable-msg=C6403 + # pylint: disable=g-explicit-bool-comparison if CAN_TEST_EMPTY_FILTER or gtest_filter != '': SetEnvVar(FILTER_ENV_VAR, gtest_filter) tests_run = RunAndExtractTestList()[0] SetEnvVar(FILTER_ENV_VAR, None) self.AssertSetEqual(tests_run, tests_to_run) - # pylint: enable-msg=C6403 + # pylint: enable=g-explicit-bool-comparison # Next, tests using the command line flag. @@ -328,7 +328,7 @@ class GTestFilterUnitTest(gtest_test_utils.TestCase): # into a process using the environment variable. However, we can still # test the case when the variable is not supplied (i.e., gtest_filter is # None). - # pylint: disable-msg=C6403 + # pylint: disable=g-explicit-bool-comparison if CAN_TEST_EMPTY_FILTER or gtest_filter != '': SetEnvVar(FILTER_ENV_VAR, gtest_filter) partition = [] @@ -340,7 +340,7 @@ class GTestFilterUnitTest(gtest_test_utils.TestCase): self.AssertPartitionIsValid(tests_to_run, partition) SetEnvVar(FILTER_ENV_VAR, None) - # pylint: enable-msg=C6403 + # pylint: enable=g-explicit-bool-comparison def RunAndVerifyAllowingDisabled(self, gtest_filter, tests_to_run): """Checks that the binary runs correct set of tests for the given filter. diff --git a/googletest/test/gtest_test_utils.py b/googletest/test/gtest_test_utils.py index eecc5334..459f9ea3 100755 --- a/googletest/test/gtest_test_utils.py +++ b/googletest/test/gtest_test_utils.py @@ -29,7 +29,7 @@ """Unit test utilities for Google C++ Testing and Mocking Framework.""" # Suppresses the 'Import not at the top of the file' lint complaint. -# pylint: disable-msg=C6204 +# pylint: disable=g-import-not-at-top import os import subprocess @@ -43,7 +43,7 @@ import atexit import shutil import tempfile import unittest as _test_module -# pylint: enable-msg=C6204 +# pylint: enable=g-import-not-at-top GTEST_OUTPUT_VAR_NAME = 'GTEST_OUTPUT'