File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -326,3 +326,23 @@ def test_expand_modules_with_ignore(
326326 )
327327 assert {k : v for k , v in modules .items () if not v ["isignored" ]} == expected
328328 assert not errors
329+
330+ @set_config (ignore = ["test" ])
331+ def test_expand_modules_with_ignore_list (self ) -> None :
332+ """Test expand_modules with a non-default value of ignore."""
333+ ignore_list : list [str ] = self .linter .config .ignore
334+ ignore_list_re = (re .compile ('^\\ .#' ),)
335+ path = Path (__file__ ).parent .parent / "regrtest_data" / "ignore_option_10669"
336+ modules , errors = expand_modules (
337+ [str (path )],
338+ [],
339+ ignore_list ,
340+ ignore_list_re ,
341+ [],
342+ )
343+ expected_keys = {
344+ str (path / "__init__.py" ),
345+ str (path / "main.py" ),
346+ }
347+ assert {k for k , v in modules .items () if not v ["isignored" ]} == expected_keys
348+ assert not errors
You can’t perform that action at this time.
0 commit comments