Show More
@@ -190,13 +190,13 b' def onlyif_cmds_exist(*commands):' | |||
|
190 | 190 | """ |
|
191 | 191 | Decorator to skip test when at least one of `commands` is not found. |
|
192 | 192 | """ |
|
193 | assert ( | |
|
194 | os.environ.get("IPTEST_WORKING_DIR", None) is None | |
|
195 | ), "iptest deprecated since IPython 8.0" | |
|
193 | 196 | for cmd in commands: |
|
194 | 197 | reason = f"This test runs only if command '{cmd}' is installed" |
|
195 | 198 | if not shutil.which(cmd): |
|
196 | if os.environ.get("IPTEST_WORKING_DIR", None) is not None: | |
|
197 | return skip(reason) | |
|
198 | else: | |
|
199 | import pytest | |
|
199 | import pytest | |
|
200 | 200 | |
|
201 |
|
|
|
201 | return pytest.mark.skip(reason=reason) | |
|
202 | 202 | return null_deco |
General Comments 0
You need to be logged in to leave comments.
Login now