Add utils.ops and nn.modules to tests (#4484)

This commit is contained in:
Glenn Jocher 2023-08-22 04:23:28 +02:00 committed by GitHub
parent 1cec0185a1
commit 6da8f7f51e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 246 additions and 330 deletions

View file

@ -6,6 +6,7 @@ from pathlib import Path
import pytest
from ultralytics.utils import ROOT
from ultralytics.utils.torch_utils import init_seeds
TMP = (ROOT / '../tests/tmp').resolve() # temp directory for test files
@ -32,6 +33,7 @@ def pytest_sessionstart(session):
"""
Called after the 'Session' object has been created and before performing test collection.
"""
init_seeds()
shutil.rmtree(TMP, ignore_errors=True) # delete any existing tests/tmp directory
TMP.mkdir(parents=True, exist_ok=True) # create a new empty directory