Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 24ca69e

Browse files
committed
remove some iptest legacy code.
1 parent 965361c commit 24ca69e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

IPython/testing/decorators.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,13 @@ def onlyif_cmds_exist(*commands):
190190
"""
191191
Decorator to skip test when at least one of `commands` is not found.
192192
"""
193+
assert (
194+
os.environ.get("IPTEST_WORKING_DIR", None) is None
195+
), "iptest deprecated since IPython 8.0"
193196
for cmd in commands:
194197
reason = f"This test runs only if command '{cmd}' is installed"
195198
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
200200

201-
return pytest.mark.skip(reason=reason)
201+
return pytest.mark.skip(reason=reason)
202202
return null_deco

0 commit comments

Comments
 (0)