Skip to content

Commit ad3f0ae

Browse files
committed
Update test_eof.py from CPython v3.12.0
1 parent 1d76b76 commit ad3f0ae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_eof.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from test import support
55
from test.support import os_helper
66
from test.support import script_helper
7+
from test.support import warnings_helper
78
import unittest
89

910
# TODO: RUSTPYTHON
@@ -38,10 +39,11 @@ def test_EOFS_with_file(self):
3839
rc, out, err = script_helper.assert_python_failure(file_name)
3940
self.assertIn(b'unterminated triple-quoted string literal (detected at line 3)', err)
4041

42+
@warnings_helper.ignore_warnings(category=SyntaxWarning)
4143
def test_eof_with_line_continuation(self):
4244
expect = "unexpected EOF while parsing (<string>, line 1)"
4345
try:
44-
compile('"\\xhh" \\', '<string>', 'exec', dont_inherit=True)
46+
compile('"\\Xhh" \\', '<string>', 'exec')
4547
except SyntaxError as msg:
4648
self.assertEqual(str(msg), expect)
4749
else:

0 commit comments

Comments
 (0)