File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,16 +103,17 @@ def __next__(self) -> str:
103103
104104def pytest_ignore_collect (collection_path : pathlib .Path , config : pytest .Config ) -> bool :
105105 """Skip tests if VCS binaries are missing."""
106- if not shutil . which ( "svn" ) and any (
106+ if any (
107107 needle in str (collection_path ) for needle in ["svn" , "subversion" ]
108- ):
108+ ) and not shutil . which ( "svn" ) :
109109 return True
110- if not shutil . which ( "git" ) and "git" in str ( collection_path ):
110+ if "git" in str ( collection_path ) and not shutil . which ( "git" ):
111111 return True
112- return bool (
113- not shutil .which ("hg" )
114- and any (needle in str (collection_path ) for needle in ["hg" , "mercurial" ]),
115- )
112+ if any ( # NOQA: SIM103
113+ needle in str (collection_path ) for needle in ["hg" , "mercurial" ]
114+ ) and not shutil .which ("hg" ):
115+ return True
116+ return False
116117
117118
118119@pytest .fixture (scope = "session" )
You can’t perform that action at this time.
0 commit comments