diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2023-09-18 13:04:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-18 13:04:17 (GMT) |
commit | 4dd47c63a97b3c39cd964ad12431fcdaf76dc823 (patch) | |
tree | 9c8328f493ed3943e77c5aa02f939975348d1ba6 | |
parent | dd5d2141abf78fcd787f12654f08bf1ee92288bf (diff) | |
download | cpython-4dd47c63a97b3c39cd964ad12431fcdaf76dc823.zip cpython-4dd47c63a97b3c39cd964ad12431fcdaf76dc823.tar.gz cpython-4dd47c63a97b3c39cd964ad12431fcdaf76dc823.tar.bz2 |
gh-108303: Fix and move `badsyntax_pep3120.py` (#109513)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
-rw-r--r-- | Lib/test/.ruff.toml | 4 | ||||
-rw-r--r-- | Lib/test/test_utf8source.py | 4 | ||||
-rw-r--r-- | Lib/test/tokenizedata/badsyntax_pep3120.py (renamed from Lib/test/badsyntax_pep3120.py) | 0 |
3 files changed, 3 insertions, 5 deletions
diff --git a/Lib/test/.ruff.toml b/Lib/test/.ruff.toml index a9a4a01..e202766 100644 --- a/Lib/test/.ruff.toml +++ b/Lib/test/.ruff.toml @@ -3,12 +3,12 @@ select = [ "F811", # Redefinition of unused variable (useful for finding test methods with the same name) ] extend-exclude = [ + # Excluded (these aren't actually executed, they're just "data files") + "tokenizedata/*.py", # Failed to lint - "badsyntax_pep3120.py", "encoded_modules/module_iso_8859_1.py", "encoded_modules/module_koi8_r.py", # Failed to parse - "badsyntax_3131.py", "support/socket_helper.py", "test_fstring.py", # TODO Fix: F811 Redefinition of unused name diff --git a/Lib/test/test_utf8source.py b/Lib/test/test_utf8source.py index 97dced8..c42b6aa 100644 --- a/Lib/test/test_utf8source.py +++ b/Lib/test/test_utf8source.py @@ -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) diff --git a/Lib/test/badsyntax_pep3120.py b/Lib/test/tokenizedata/badsyntax_pep3120.py index d14b4c9..d14b4c9 100644 --- a/Lib/test/badsyntax_pep3120.py +++ b/Lib/test/tokenizedata/badsyntax_pep3120.py |