Update test_cli.py

cli-info
Laughing-q 2 months ago
parent c169ee4d3f
commit 1fbb21e2c7
  1. 3
      tests/test_cli.py

@ -8,7 +8,7 @@ from PIL import Image
from tests import CUDA_DEVICE_COUNT, CUDA_IS_AVAILABLE
from ultralytics.cfg import TASK2DATA, TASK2MODEL, TASKS
from ultralytics.utils import ASSETS, WEIGHTS_DIR, checks, remove_colorstr
from ultralytics.utils import ASSETS, WEIGHTS_DIR, checks
from ultralytics.utils.torch_utils import TORCH_1_9
# Constants
@ -128,6 +128,7 @@ def test_yolo_info():
assert f"Model File: {model_path.as_posix().replace('/', os.sep)}" in stdout and stderr == ""
assert "parameters" in stdout.lower() and stderr == ""
from ultralytics.utils import remove_colorstr
# Test with non-existent model file
stdout, _ = run_yolo_info("model=not-a-model.pt")
assert "Model 'not-a-model.pt' not found" in remove_colorstr(stdout)

Loading…
Cancel
Save