diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2022-12-07 02:44:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-07 02:44:47 (GMT) |
commit | 889b0b9bf95651fc05ad532cc4a66c0f8ff29fc2 (patch) | |
tree | d9cdea0f72c31aee39cbe0d2744ad7a6bc66b222 /Lib/test/test_enum.py | |
parent | 97e7004cfe48305bcd642c653b406dc7470e196d (diff) | |
download | cpython-889b0b9bf95651fc05ad532cc4a66c0f8ff29fc2.zip cpython-889b0b9bf95651fc05ad532cc4a66c0f8ff29fc2.tar.gz cpython-889b0b9bf95651fc05ad532cc4a66c0f8ff29fc2.tar.bz2 |
[Enum] Remove unused code from `test_enum.py` (GH-96986)
Diffstat (limited to 'Lib/test/test_enum.py')
-rw-r--r-- | Lib/test/test_enum.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index 146ef39..376347e 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -4553,11 +4553,6 @@ COMPLEX_C = 1j COMPLEX_A = 2j COMPLEX_B = 3j -class _ModuleWrapper: - """We use this class as a namespace for swapping modules.""" - def __init__(self, module): - self.__dict__.update(module.__dict__) - class TestConvert(unittest.TestCase): def tearDown(self): # Reset the module-level test variables to their original integer @@ -4597,12 +4592,6 @@ class TestConvert(unittest.TestCase): self.assertEqual(test_type.CONVERT_TEST_NAME_D, 5) self.assertEqual(test_type.CONVERT_TEST_NAME_E, 5) # Ensure that test_type only picked up names matching the filter. - int_dir = dir(int) + [ - 'CONVERT_TEST_NAME_A', 'CONVERT_TEST_NAME_B', 'CONVERT_TEST_NAME_C', - 'CONVERT_TEST_NAME_D', 'CONVERT_TEST_NAME_E', 'CONVERT_TEST_NAME_F', - 'CONVERT_TEST_SIGABRT', 'CONVERT_TEST_SIGIOT', - 'CONVERT_TEST_EIO', 'CONVERT_TEST_EBUS', - ] extra = [name for name in dir(test_type) if name not in enum_dir(test_type)] missing = [name for name in enum_dir(test_type) if name not in dir(test_type)] self.assertEqual( @@ -4644,7 +4633,6 @@ class TestConvert(unittest.TestCase): self.assertEqual(test_type.CONVERT_STR_TEST_1, 'hello') self.assertEqual(test_type.CONVERT_STR_TEST_2, 'goodbye') # Ensure that test_type only picked up names matching the filter. - str_dir = dir(str) + ['CONVERT_STR_TEST_1', 'CONVERT_STR_TEST_2'] extra = [name for name in dir(test_type) if name not in enum_dir(test_type)] missing = [name for name in enum_dir(test_type) if name not in dir(test_type)] self.assertEqual( @@ -4712,8 +4700,6 @@ def member_dir(member): allowed.add(name) return sorted(allowed) -missing = object() - if __name__ == '__main__': unittest.main() |