File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -70,15 +70,15 @@ def test_runsource_bytes(self):
70
70
self .assertEqual (i .locals ['b' ], "\xfe " )
71
71
72
72
@unittest .skipUnless (py3 , "Only a syntax error in Python 3" )
73
- @mock .patch .object (interpreter .Interp , 'showsyntaxerror' )
74
- def test_runsource_bytes_over_128_syntax_error (self ):
73
+ def test_runsource_bytes_over_128_syntax_error_py3 (self ):
75
74
i = interpreter .Interp (encoding = 'latin-1' )
75
+ i .showsyntaxerror = mock .Mock (return_value = None )
76
76
77
77
i .runsource ("a = b'\xfe '" , encode = True )
78
- i .showsyntaxerror .assert_called_with ()
78
+ i .showsyntaxerror .assert_called_with (mock . ANY )
79
79
80
80
@unittest .skipIf (py3 , "encode is Python 2 only" )
81
- def test_runsource_bytes_over_128_syntax_error (self ):
81
+ def test_runsource_bytes_over_128_syntax_error_py2 (self ):
82
82
i = interpreter .Interp (encoding = 'latin-1' )
83
83
84
84
i .runsource ("a = b'\xfe '" , encode = True )
You can’t perform that action at this time.
0 commit comments