]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-108303: Fix and move `badsyntax_pep3120.py` (#109513)
authorNikita Sobolev <mail@sobolevn.me>
Mon, 18 Sep 2023 13:04:17 +0000 (16:04 +0300)
committerGitHub <noreply@github.com>
Mon, 18 Sep 2023 13:04:17 +0000 (14:04 +0100)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Lib/test/.ruff.toml
Lib/test/test_utf8source.py
Lib/test/tokenizedata/badsyntax_pep3120.py [moved from Lib/test/badsyntax_pep3120.py with 100% similarity]

index a9a4a013dabec90655d8a464bbef86677ce96a02..e202766b147e6d2284212b22d2b99fe2c0ce7716 100644 (file)
@@ -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
index 97dced8a6228890490f5659b5496b2befff0aab1..c42b6aaaab579d45ffa5a15abd2e430332b14639 100644 (file)
@@ -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)