https://github.com/python/cpython/commit/e28097682eb96550e30a66c65d929b412bf51d52
commit: e28097682eb96550e30a66c65d929b412bf51d52
branch: 3.12
author: Hugo van Kemenade <1324225+hug...@users.noreply.github.com>
committer: hugovk <1324225+hug...@users.noreply.github.com>
date: 2025-02-26T09:46:12+02:00
summary:

[3.12] gh-108303: Fix and move `badsyntax_pep3120.py` (GH-109513) (#130540)

(cherry picked from commit 4dd47c63a97b3c39cd964ad12431fcdaf76dc823)

Co-authored-by: Nikita Sobolev <m...@sobolevn.me>
Co-authored-by: Alex Waygood <alex.wayg...@gmail.com>

files:
A Lib/test/tokenizedata/badsyntax_pep3120.py
D Lib/test/badsyntax_pep3120.py
M Lib/test/.ruff.toml
M Lib/test/test_utf8source.py

diff --git a/Lib/test/.ruff.toml b/Lib/test/.ruff.toml
index 1632900057cd74..79ee34362644a2 100644
--- a/Lib/test/.ruff.toml
+++ b/Lib/test/.ruff.toml
@@ -2,12 +2,12 @@ fix = true
 extend-exclude = [
     # Excluded (run with the other AC files in its own separate ruff job in 
pre-commit)
     "test_clinic.py",
+    # 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",
     "test_lib2to3/data/bom.py",
     "test_lib2to3/data/crlf.py",
     "test_lib2to3/data/different_encoding.py",
diff --git a/Lib/test/test_utf8source.py b/Lib/test/test_utf8source.py
index 97dced8a622889..c42b6aaaab579d 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 @@ def test_pep3120(self):
 
     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
similarity index 100%
rename from Lib/test/badsyntax_pep3120.py
rename to Lib/test/tokenizedata/badsyntax_pep3120.py

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to