mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.11] gh-108303: Fix and move badsyntax_pep3120.py
(GH-109513) (#109724)
* [3.11] gh-108303: Fix and move `badsyntax_pep3120.py` (GH-109513)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>.
(cherry picked from commit 4dd47c63a9
)
Backport to 3.11: update also test_imp.
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
parent
567c3e846e
commit
6bb18bb0b4
4 changed files with 8 additions and 8 deletions
|
@ -1,5 +1,3 @@
|
|||
# This file is marked as binary in the CVS, to prevent MacCVS from recoding it.
|
||||
|
||||
import unittest
|
||||
|
||||
class PEP3120Test(unittest.TestCase):
|
||||
|
@ -16,7 +14,7 @@ class PEP3120Test(unittest.TestCase):
|
|||
|
||||
def test_badsyntax(self):
|
||||
try:
|
||||
import test.badsyntax_pep3120
|
||||
import test.tokenizedata.badsyntax_pep3120
|
||||
except SyntaxError as msg:
|
||||
msg = str(msg).lower()
|
||||
self.assertTrue('utf-8' in msg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue