Skip to content

Commit e280976

Browse files
hugovksobolevnAlexWaygood
authored
[3.12] gh-108303: Fix and move badsyntax_pep3120.py (GH-109513) (#130540)
(cherry picked from commit 4dd47c6) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
1 parent ca9e52d commit e280976

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

Lib/test/.ruff.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ fix = true
22
extend-exclude = [
33
# Excluded (run with the other AC files in its own separate ruff job in pre-commit)
44
"test_clinic.py",
5+
# Excluded (these aren't actually executed, they're just "data files")
6+
"tokenizedata/*.py",
57
# Failed to lint
6-
"badsyntax_pep3120.py",
78
"encoded_modules/module_iso_8859_1.py",
89
"encoded_modules/module_koi8_r.py",
910
# Failed to parse
10-
"badsyntax_3131.py",
1111
"test_lib2to3/data/bom.py",
1212
"test_lib2to3/data/crlf.py",
1313
"test_lib2to3/data/different_encoding.py",

Lib/test/test_utf8source.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# This file is marked as binary in the CVS, to prevent MacCVS from recoding it.
2-
31
import unittest
42

53
class PEP3120Test(unittest.TestCase):
@@ -16,7 +14,7 @@ def test_pep3120(self):
1614

1715
def test_badsyntax(self):
1816
try:
19-
import test.badsyntax_pep3120
17+
import test.tokenizedata.badsyntax_pep3120
2018
except SyntaxError as msg:
2119
msg = str(msg).lower()
2220
self.assertTrue('utf-8' in msg)

0 commit comments

Comments
 (0)