Skip to content

Commit 258aed9

Browse files
authored
Skip CLI tests if not built. (dmlc#11245)
1 parent 9b890f5 commit 258aed9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/python/test_cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import tempfile
66

77
import numpy
8+
import pytest
89

910
import xgboost
1011
from xgboost import testing as tm
@@ -39,7 +40,8 @@ def get_exe(self):
3940
else:
4041
exe = 'xgboost'
4142
exe = os.path.join(self.PROJECT_ROOT, exe)
42-
assert os.path.exists(exe)
43+
if not os.path.exists(exe):
44+
pytest.skip("CLI executable not found.")
4345
return exe
4446

4547
def test_cli_model(self):

0 commit comments

Comments
 (0)