File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,11 @@ class CAPITest(unittest.TestCase):
1818
1919 maxDiff = None
2020
21- def check_sys_getattr_common (self , sys_getattr , use_bytes = True ):
21+ def check_sys_getattr_common (self , sys_getattr ):
2222 self .assertIs (sys_getattr ('stdout' ), sys .stdout )
2323
24- name = '\U0001f40d '
25- with support .swap_attr (sys , name , 42 ):
26- key = (name .encode () if use_bytes else name )
27- self .assertEqual (sys_getattr (key ), 42 )
24+ with support .swap_attr (sys , '\U0001f40d ' , 42 ):
25+ self .assertEqual (sys_getattr ('\U0001f40d ' ), 42 )
2826
2927 @support .cpython_only
3028 def test_sys_getobject (self ):
@@ -42,7 +40,7 @@ def test_sys_getobject(self):
4240 # CRASHES getobject(NULL)
4341
4442 def check_sys_getattr (self , sys_getattr ):
45- self .check_sys_getattr_common (sys_getattr , use_bytes = False )
43+ self .check_sys_getattr_common (sys_getattr )
4644
4745 with self .assertRaises (AttributeError ):
4846 sys_getattr (b'nonexisting' )
You can’t perform that action at this time.
0 commit comments