Update test results directory structure and enhance Docker configurations

- Modified `.gitignore` to reflect the new path for test results.
- Updated `docker-compose.test.yml` to mount the correct test results directory.
- Adjusted `Dockerfile.test` to set the `PYTHONPATH` and ensure test results are saved in the updated location.
- Added `boto3` and `netron` to `requirements-test.txt` to support new functionalities.
- Updated `pytest.ini` to include the new `pythonpath` for test discovery.

These changes streamline the testing process and ensure compatibility with the updated directory structure.
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-03-28 00:13:08 +02:00
parent c20018745b
commit 243b69656b
48 changed files with 707 additions and 581 deletions
+2 -16
View File
@@ -1,24 +1,10 @@
import sys
import types
import importlib
import shutil
from os import path as osp
from os import path
from pathlib import Path
import pytest
for _n in ("boto3", "netron", "requests"):
if _n not in sys.modules:
sys.modules[_n] = types.ModuleType(_n)
for _k in [k for k in sys.modules if k == "ultralytics" or k.startswith("ultralytics.")]:
del sys.modules[_k]
from ultralytics import YOLO
for _m in ("exports", "train"):
if _m in sys.modules:
importlib.reload(sys.modules[_m])
import constants as c
import train as train_mod
import exports as exports_mod
@@ -56,7 +42,7 @@ def e2e_result(tmp_path_factory):
exports_mod.export_onnx(c.config.current_pt_model)
exports_mod.export_coreml(c.config.current_pt_model)
today_ds = osp.join(c.config.datasets_dir, train_mod.today_folder)
today_ds = path.join(c.config.datasets_dir, train_mod.today_folder)
yield {
"today_dataset": today_ds,