Default fudai regression collection to samples
This commit is contained in:
1 parent
ce0e9a3585
commit
9ed73bf64b
4 files changed
+106
-47
No files matched your search
@@ -117,9 +117,11 @@ class TestRunCliParseArgs:
|
||||
'--disable-regression-collection',
|
||||
'--regression-collection-max-images',
|
||||
'120',
|
||||
'--regression-full-run-package',
|
||||
])
|
||||
assert result.disable_regression_collection is True
|
||||
assert result.regression_collection_max_images == 120
|
||||
assert result.regression_full_run_package is True
|
||||
|
||||
|
||||
class TestRunCliModule:
|
||||
|
||||
@@ -173,3 +173,30 @@ def test_collect_run_regression_artifacts_promotes_long_term_error_samples(tmp_p
|
||||
sample_root = root / "artifacts" / "fudai_regression_samples"
|
||||
assert (sample_root / "index.jsonl").exists()
|
||||
assert len(list(sample_root.rglob("*.png"))) >= 3
|
||||
|
||||
|
||||
def test_collect_run_regression_artifacts_sample_only_skips_full_run_package(tmp_path, monkeypatch):
|
||||
from douyin.testing.regression_collector import collect_run_regression_artifacts
|
||||
|
||||
root = tmp_path
|
||||
debug = root / "pic" / "debug_captures" / "2026-06-19"
|
||||
debug.mkdir(parents=True)
|
||||
(debug / "20260619_px_fdicon_false_left_coupon_x162.png").write_bytes(b"coupon")
|
||||
|
||||
monkeypatch.setattr(
|
||||
"douyin.testing.regression_collector.path_config.get_project_root",
|
||||
lambda: str(root),
|
||||
)
|
||||
|
||||
result = collect_run_regression_artifacts(
|
||||
run_id="sample_only",
|
||||
started_at=0.0,
|
||||
full_run_package=False,
|
||||
max_debug_images=10,
|
||||
)
|
||||
|
||||
assert result["output_dir"] == ""
|
||||
assert result["manifest"] == ""
|
||||
assert result["counts"]["long_term_samples"] == 1
|
||||
assert not (root / "artifacts" / "fudai_regression_runs" / "sample_only").exists()
|
||||
assert (root / "artifacts" / "fudai_regression_samples" / "index.jsonl").exists()
|
||||
Reference in new issue
Block a user