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