Skip to content

Commit 9ebcee1

Browse files
committed
Use empty string instead of None in cli args test
1 parent 227138d commit 9ebcee1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/nn/test_training.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def test_resume_training_cli(
389389
assert trainer.config.model.base_checkpoint == base_checkpoint_path
390390

391391

392-
@pytest.mark.parametrize("keep_viz_cli", [None, "--keep_viz"])
392+
@pytest.mark.parametrize("keep_viz_cli", ["", "--keep_viz"])
393393
def test_keep_viz_cli(
394394
keep_viz_cli,
395395
min_single_instance_robot_model_path: str,
@@ -407,4 +407,6 @@ def test_keep_viz_cli(
407407
trainer = sleap_train(cli_args)
408408

409409
# Check that --keep_viz is set correctly
410-
assert trainer.config.outputs.keep_viz_images == bool(keep_viz_cli)
410+
assert trainer.config.outputs.keep_viz_images == (
411+
True if keep_viz_cli == "--keep_viz" else False
412+
)

0 commit comments

Comments
 (0)