File tree 4 files changed +8
-8
lines changed
4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ select = [
3
3
" F811" , # Redefinition of unused variable (useful for finding test methods with the same name)
4
4
]
5
5
extend-exclude = [
6
+ # Excluded (these aren't actually executed, they're just "data files")
7
+ " tokenizedata/*.py" ,
6
8
# Failed to lint
7
- " badsyntax_pep3120.py" ,
8
9
" encoded_modules/module_iso_8859_1.py" ,
9
10
" encoded_modules/module_koi8_r.py" ,
10
11
" test_source_encoding.py" ,
11
12
# Failed to parse
12
- " badsyntax_3131.py" ,
13
13
" test_fstring.py" ,
14
14
# TODO Fix: F811 Redefinition of unused name
15
15
" test_buffer.py" ,
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ def test_find_module_encoding(self):
78
78
with imp .find_module ('module_' + mod , self .test_path )[0 ] as fd :
79
79
self .assertEqual (fd .encoding , encoding )
80
80
81
- path = [os .path .dirname (__file__ )]
81
+ path = [os .path .join ( os . path . dirname (__file__ ), 'tokenizedata' )]
82
82
with self .assertRaises (SyntaxError ):
83
83
imp .find_module ('badsyntax_pep3120' , path )
84
84
@@ -203,9 +203,11 @@ def test_issue5604(self):
203
203
os_helper .rmtree ('__pycache__' )
204
204
205
205
def test_issue9319 (self ):
206
- path = os .path .dirname (__file__ )
206
+ path = os .path .join ( os . path . dirname (__file__ ), "tokenizedata" )
207
207
self .assertRaises (SyntaxError ,
208
- imp .find_module , "badsyntax_pep3120" , [path ])
208
+ imp .find_module ,
209
+ "badsyntax_pep3120" ,
210
+ [path ])
209
211
210
212
def test_load_from_source (self ):
211
213
# 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
-
3
1
import unittest
4
2
5
3
class PEP3120Test (unittest .TestCase ):
@@ -16,7 +14,7 @@ def test_pep3120(self):
16
14
17
15
def test_badsyntax (self ):
18
16
try :
19
- import test .badsyntax_pep3120
17
+ import test .tokenizedata . badsyntax_pep3120
20
18
except SyntaxError as msg :
21
19
msg = str (msg ).lower ()
22
20
self .assertTrue ('utf-8' in msg )
File renamed without changes.
You can’t perform that action at this time.
0 commit comments