@@ -4553,11 +4553,6 @@ class Quadruple(Enum):
45534553COMPLEX_A = 2j
45544554COMPLEX_B = 3j
45554555
4556- class _ModuleWrapper :
4557- """We use this class as a namespace for swapping modules."""
4558- def __init__ (self , module ):
4559- self .__dict__ .update (module .__dict__ )
4560-
45614556class TestConvert (unittest .TestCase ):
45624557 def tearDown (self ):
45634558 # Reset the module-level test variables to their original integer
@@ -4597,12 +4592,6 @@ def test_convert_int(self):
45974592 self .assertEqual (test_type .CONVERT_TEST_NAME_D , 5 )
45984593 self .assertEqual (test_type .CONVERT_TEST_NAME_E , 5 )
45994594 # Ensure that test_type only picked up names matching the filter.
4600- int_dir = dir (int ) + [
4601- 'CONVERT_TEST_NAME_A' , 'CONVERT_TEST_NAME_B' , 'CONVERT_TEST_NAME_C' ,
4602- 'CONVERT_TEST_NAME_D' , 'CONVERT_TEST_NAME_E' , 'CONVERT_TEST_NAME_F' ,
4603- 'CONVERT_TEST_SIGABRT' , 'CONVERT_TEST_SIGIOT' ,
4604- 'CONVERT_TEST_EIO' , 'CONVERT_TEST_EBUS' ,
4605- ]
46064595 extra = [name for name in dir (test_type ) if name not in enum_dir (test_type )]
46074596 missing = [name for name in enum_dir (test_type ) if name not in dir (test_type )]
46084597 self .assertEqual (
@@ -4644,7 +4633,6 @@ def test_convert_str(self):
46444633 self .assertEqual (test_type .CONVERT_STR_TEST_1 , 'hello' )
46454634 self .assertEqual (test_type .CONVERT_STR_TEST_2 , 'goodbye' )
46464635 # Ensure that test_type only picked up names matching the filter.
4647- str_dir = dir (str ) + ['CONVERT_STR_TEST_1' , 'CONVERT_STR_TEST_2' ]
46484636 extra = [name for name in dir (test_type ) if name not in enum_dir (test_type )]
46494637 missing = [name for name in enum_dir (test_type ) if name not in dir (test_type )]
46504638 self .assertEqual (
@@ -4712,8 +4700,6 @@ def member_dir(member):
47124700 allowed .add (name )
47134701 return sorted (allowed )
47144702
4715- missing = object ()
4716-
47174703
47184704if __name__ == '__main__' :
47194705 unittest .main ()
0 commit comments