Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Diagnose failing CLI tests on Windows #10403

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[WIP] Diagnose failing CLI tests on Windows
  • Loading branch information
hcho3 committed Jun 8, 2024
commit bc5313ca71715fbb68a10a4c9d76673dbeff9838
8 changes: 4 additions & 4 deletions tests/python/test_cli.py
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ def test_cli_model(self):
with open(config_path, 'w') as fd:
fd.write(train_conf)

subprocess.run([exe, config_path])
subprocess.run([exe, config_path], check=True)

predict_out = os.path.join(tmpdir,
'test_load_cli_model-prediction')
@@ -128,7 +128,7 @@ def test_cli_help(self):
assert error_msg.find('Usage') != -1
assert error_msg.find('eval[NAME]') != -1

completed = subprocess.run([exe, '-V'], stdout=subprocess.PIPE)
completed = subprocess.run([exe, '-V'], stdout=subprocess.PIPE, check=True)
msg = completed.stdout.decode('utf-8')
assert msg.find('XGBoost') != -1
v = xgboost.__version__
@@ -161,7 +161,7 @@ def test_cli_model_json(self):
with open(config_path, 'w') as fd:
fd.write(train_conf)

subprocess.run([exe, config_path])
subprocess.run([exe, config_path], check=True)
with open(model_out_cli, 'r') as fd:
model = json.load(fd)

@@ -189,5 +189,5 @@ def test_cli_save_model(self):
with open(config_path, 'w') as fd:
fd.write(train_conf)

subprocess.run([exe, config_path])
subprocess.run([exe, config_path], check=True)
assert os.path.exists(model_out_cli)
Loading