Skip to content

Commit 06f8a27

Browse files
committed
TEST: Disable test_cli if xdist is enabled
1 parent 4e2abf0 commit 06f8a27

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

nitransforms/tests/test_cli.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
import os
12
from textwrap import dedent
23

34
import pytest
45

56
from ..cli import cli_apply, main as ntcli
67

8+
if os.getenv("PYTEST_XDIST_WORKER"):
9+
breaks_on_xdist = pytest.mark.skip(reason="xdist is active; rerun without to run this test.")
10+
else:
11+
def breaks_on_xdist(test):
12+
return test
713

14+
15+
@breaks_on_xdist
816
def test_cli(capsys):
917
# empty command
1018
with pytest.raises(SystemExit):

0 commit comments

Comments
 (0)