aboutsummaryrefslogtreecommitdiff
path: root/absl/testing/tests
diff options
context:
space:
mode:
authorYilei Yang <yileiyang@google.com>2019-09-26 13:21:16 -0700
committerCopybara-Service <copybara-worker@google.com>2019-09-26 13:21:48 -0700
commit172ff11471263e4323e2cab1dc089ac0bcb652b3 (patch)
tree364c5dc03ea4ae81a48d522b68aade39163712b6 /absl/testing/tests
parent9f7787c639209d564c51e07971107f5a8490d90e (diff)
downloadabsl-py-172ff11471263e4323e2cab1dc089ac0bcb652b3.tar.gz
Skip the ParameterizedTestsTest.test_missing_inheritance on Python 3.7.0 to 3.7.2.
These Python versions have a bug in unittest (https://bugs.python.org/issue35767) that breaks test_missing_inheritance. If a test forgets to inherit from the class, it still fails as expected, just with non obvious error messages. PiperOrigin-RevId: 271416799 Change-Id: Ief80b488dc5d4771590dcdece1fbdbb213f8cb4e
Diffstat (limited to 'absl/testing/tests')
-rwxr-xr-xabsl/testing/tests/parameterized_test.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/absl/testing/tests/parameterized_test.py b/absl/testing/tests/parameterized_test.py
index 358bb98..4235675 100755
--- a/absl/testing/tests/parameterized_test.py
+++ b/absl/testing/tests/parameterized_test.py
@@ -18,6 +18,7 @@ from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
+import sys
import unittest
from absl._collections_abc import abc
@@ -389,6 +390,10 @@ class ParameterizedTestsTest(absltest.TestCase):
class SubclassTestCase(SuperclassTestCase):
pass
+ @unittest.skipIf(
+ (sys.version_info[:2] == (3, 7) and sys.version_info[2] in {0, 1, 2}),
+ 'Python 3.7.0 to 3.7.2 have a bug that breaks this test, see '
+ 'https://bugs.python.org/issue35767')
def test_missing_inheritance(self):
ts = unittest.makeSuite(self.BadAdditionParams)
self.assertEqual(1, ts.countTestCases())