ultralytics 8.1.44 add IS_RASPBERRYPI and constants refactor (#9827)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-04-07 00:47:12 +02:00 committed by GitHub
parent 3f34a7c3af
commit 7d891a4aa4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 146 additions and 141 deletions

View file

@ -2,6 +2,7 @@
import sys
from unittest import mock
from ultralytics import YOLO
from ultralytics.cfg import get_cfg
from ultralytics.engine.exporter import Exporter
@ -52,7 +53,7 @@ def test_detect():
pred.add_callback("on_predict_start", test_func)
assert test_func in pred.callbacks["on_predict_start"], "callback test failed"
# Confirm there is no issue with sys.argv being empty.
with mock.patch.object(sys, 'argv', []):
with mock.patch.object(sys, "argv", []):
result = pred(source=ASSETS, model=f"{MODEL}.pt")
assert len(result), "predictor test failed"