File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -108,16 +108,17 @@ def __next__(self) -> str:
108
108
109
109
def pytest_ignore_collect (collection_path : pathlib .Path , config : pytest .Config ) -> bool :
110
110
"""Skip tests if VCS binaries are missing."""
111
- if not shutil . which ( "svn" ) and any (
111
+ if any (
112
112
needle in str (collection_path ) for needle in ["svn" , "subversion" ]
113
- ):
113
+ ) and not shutil . which ( "svn" ) :
114
114
return True
115
- if not shutil . which ( "git" ) and "git" in str ( collection_path ):
115
+ if "git" in str ( collection_path ) and not shutil . which ( "git" ):
116
116
return True
117
- return bool (
118
- not shutil .which ("hg" )
119
- and any (needle in str (collection_path ) for needle in ["hg" , "mercurial" ]),
120
- )
117
+ if any ( # NOQA: SIM103
118
+ needle in str (collection_path ) for needle in ["hg" , "mercurial" ]
119
+ ) and not shutil .which ("hg" ):
120
+ return True
121
+ return False
121
122
122
123
123
124
@pytest .fixture (scope = "session" )
You can’t perform that action at this time.
0 commit comments