File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ select = [
33 " F811" , # Redefinition of unused variable (useful for finding test methods with the same name)
44]
55extend-exclude = [
6+ # Excluded (these aren't actually executed, they're just "data files")
7+ " tokenizedata/*.py" ,
68 # Failed to lint
7- " badsyntax_pep3120.py" ,
89 " encoded_modules/module_iso_8859_1.py" ,
910 " encoded_modules/module_koi8_r.py" ,
1011 " test_source_encoding.py" ,
1112 # Failed to parse
12- " badsyntax_3131.py" ,
1313 " test_fstring.py" ,
1414 # TODO Fix: F811 Redefinition of unused name
1515 " test_buffer.py" ,
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ def test_find_module_encoding(self):
7878 with imp .find_module ('module_' + mod , self .test_path )[0 ] as fd :
7979 self .assertEqual (fd .encoding , encoding )
8080
81- path = [os .path .dirname (__file__ )]
81+ path = [os .path .join ( os . path . dirname (__file__ ), 'tokenizedata' )]
8282 with self .assertRaises (SyntaxError ):
8383 imp .find_module ('badsyntax_pep3120' , path )
8484
@@ -203,9 +203,11 @@ def test_issue5604(self):
203203 os_helper .rmtree ('__pycache__' )
204204
205205 def test_issue9319 (self ):
206- path = os .path .dirname (__file__ )
206+ path = os .path .join ( os . path . dirname (__file__ ), "tokenizedata" )
207207 self .assertRaises (SyntaxError ,
208- imp .find_module , "badsyntax_pep3120" , [path ])
208+ imp .find_module ,
209+ "badsyntax_pep3120" ,
210+ [path ])
209211
210212 def test_load_from_source (self ):
211213 # Verify that the imp module can correctly load and find .py files
Original file line number Diff line number Diff line change 1- # This file is marked as binary in the CVS, to prevent MacCVS from recoding it.
2-
31import unittest
42
53class 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 )
File renamed without changes.
You can’t perform that action at this time.
0 commit comments