diff options
author | Sergei Lebedev <slebedev@google.com> | 2020-06-23 01:43:20 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2020-06-23 01:43:40 -0700 |
commit | 3818cf9e07a8fbc0c35434afe808623b23237189 (patch) | |
tree | 81a3846731026c6d929b713402d2386700f3c7fc /absl/testing | |
parent | 5617b310c61fbb91fab90c9eb3529aa20e728fd4 (diff) | |
download | absl-py-3818cf9e07a8fbc0c35434afe808623b23237189.tar.gz |
Use six.add_metaclass instead of six.with_metaclass in parameterized.TestCase
This allows static analysis tools to infer the base classes without any
six-specific special-casing.
PiperOrigin-RevId: 317822776
Change-Id: I94c5b5785732ad42e00ebe17f5fc8292ba5c0a0a
Diffstat (limited to 'absl/testing')
-rwxr-xr-x | absl/testing/parameterized.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/absl/testing/parameterized.py b/absl/testing/parameterized.py index 0813014..46b6b48 100755 --- a/absl/testing/parameterized.py +++ b/absl/testing/parameterized.py @@ -537,7 +537,8 @@ def _update_class_dict_for_param_test_case( test_params_reprs[new_name] = getattr(func, '__x_params_repr__', '') -class TestCase(six.with_metaclass(TestGeneratorMetaclass, absltest.TestCase)): +@six.add_metaclass(TestGeneratorMetaclass) +class TestCase(absltest.TestCase): """Base class for test cases using the parameters decorator.""" # visibility: private; do not call outside this class. |