aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio_tests/tests/unit/_sanity/_sanity_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/grpcio_tests/tests/unit/_sanity/_sanity_test.py')
-rw-r--r--src/python/grpcio_tests/tests/unit/_sanity/_sanity_test.py32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/python/grpcio_tests/tests/unit/_sanity/_sanity_test.py b/src/python/grpcio_tests/tests/unit/_sanity/_sanity_test.py
index e9fdf217ae..0fbe6a2b5d 100644
--- a/src/python/grpcio_tests/tests/unit/_sanity/_sanity_test.py
+++ b/src/python/grpcio_tests/tests/unit/_sanity/_sanity_test.py
@@ -38,21 +38,23 @@ import tests
class Sanity(unittest.TestCase):
- def testTestsJsonUpToDate(self):
- """Autodiscovers all test suites and checks that tests.json is up to date"""
- loader = tests.Loader()
- loader.loadTestsFromNames(['tests'])
- test_suite_names = [
- test_case_class.id().rsplit('.', 1)[0]
- for test_case_class in tests._loader.iterate_suite_cases(loader.suite)]
- test_suite_names = sorted(set(test_suite_names))
-
- tests_json_string = pkg_resources.resource_string('tests', 'tests.json')
- if six.PY3:
- tests_json_string = tests_json_string.decode()
- tests_json = json.loads(tests_json_string)
- self.assertListEqual(test_suite_names, tests_json)
+ def testTestsJsonUpToDate(self):
+ """Autodiscovers all test suites and checks that tests.json is up to date"""
+ loader = tests.Loader()
+ loader.loadTestsFromNames(['tests'])
+ test_suite_names = [
+ test_case_class.id().rsplit('.', 1)[0]
+ for test_case_class in tests._loader.iterate_suite_cases(
+ loader.suite)
+ ]
+ test_suite_names = sorted(set(test_suite_names))
+
+ tests_json_string = pkg_resources.resource_string('tests', 'tests.json')
+ if six.PY3:
+ tests_json_string = tests_json_string.decode()
+ tests_json = json.loads(tests_json_string)
+ self.assertListEqual(test_suite_names, tests_json)
if __name__ == '__main__':
- unittest.main(verbosity=2)
+ unittest.main(verbosity=2)