File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 4
4
from test import support
5
5
from test .support import os_helper
6
6
from test .support import script_helper
7
+ from test .support import warnings_helper
7
8
import unittest
8
9
9
10
class EOFTestCase (unittest .TestCase ):
@@ -36,10 +37,11 @@ def test_EOFS_with_file(self):
36
37
rc , out , err = script_helper .assert_python_failure (file_name )
37
38
self .assertIn (b'unterminated triple-quoted string literal (detected at line 3)' , err )
38
39
40
+ @warnings_helper .ignore_warnings (category = SyntaxWarning )
39
41
def test_eof_with_line_continuation (self ):
40
42
expect = "unexpected EOF while parsing (<string>, line 1)"
41
43
try :
42
- compile ('"\\ xhh " \\ ' , '<string>' , 'exec' , dont_inherit = True )
44
+ compile ('"\\ Xhh " \\ ' , '<string>' , 'exec' )
43
45
except SyntaxError as msg :
44
46
self .assertEqual (str (msg ), expect )
45
47
else :
You can’t perform that action at this time.
0 commit comments