File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1191,6 +1191,23 @@ def test_is_python_file(self):
11911191 self .assertFalse (autoflake .is_python_file (os .devnull ))
11921192 self .assertFalse (autoflake .is_python_file ('/bin/bash' ))
11931193
1194+ def test_is_exclude_file (self ):
1195+ self .assertTrue (autoflake .is_exclude_file (
1196+ "1.py" , ["test*" , "1*" ]))
1197+
1198+ self .assertFalse (autoflake .is_exclude_file (
1199+ "2.py" , ["test*" , "1*" ]))
1200+
1201+ # folder glob
1202+ self .assertTrue (autoflake .is_exclude_file (
1203+ "test/test.py" , ["test/**.py" ]))
1204+
1205+ self .assertTrue (autoflake .is_exclude_file (
1206+ "test/auto_test.py" , ["test/*_test.py" ]))
1207+
1208+ self .assertFalse (autoflake .is_exclude_file (
1209+ "test/auto_auto.py" , ["test/*_test.py" ]))
1210+
11941211 def test_match_file (self ):
11951212 with temporary_file ('' , suffix = '.py' , prefix = '.' ) as filename :
11961213 self .assertFalse (autoflake .match_file (filename , exclude = []),
You can’t perform that action at this time.
0 commit comments