This commit is contained in:
@@ -177,7 +177,7 @@ def test_plot_display_variant_exports(comparison, tmp_path, colors, anonymize):
|
||||
for name in ("performance_energy_compact", "speedup_compact_comparison"):
|
||||
svg = (tmp_path / f"svg/{name}.svg").read_text()
|
||||
if name == "performance_energy_compact":
|
||||
assert ("Anonimized better" in svg) == anonymize
|
||||
assert ("ANON better" in svg) == anonymize
|
||||
assert ("Raptor better" in svg) == (not anonymize)
|
||||
svg_colors = re.findall(r"(?:fill|stroke):\s*#([0-9a-fA-F]{6})", svg)
|
||||
assert svg_colors
|
||||
@@ -207,9 +207,9 @@ def test_anonymization_reaches_all_plot_labels(comparison, monkeypatch):
|
||||
comparison.main()
|
||||
assert len(captured) == 30
|
||||
assert all("Raptor" not in label for labels in captured.values() for label in labels)
|
||||
assert "Anonimized pipeline stages" in captured["raptor_pipeline_throughput"]
|
||||
assert "Anonimized better →" in captured["performance_energy_compact"]
|
||||
assert "Anonimized\n2 stages" in captured["validation_status"]
|
||||
assert "ANON pipeline stages" in captured["raptor_pipeline_throughput"]
|
||||
assert "ANON better →" in captured["performance_energy_compact"]
|
||||
assert "ANON\n2 stages" in captured["validation_status"]
|
||||
finally:
|
||||
comparison.configure_style()
|
||||
|
||||
@@ -262,6 +262,8 @@ def test_repeated_pimcomp_batch_results_must_agree(comparison, comparison_csv, t
|
||||
fields, rows = comparison_csv
|
||||
row = next(row for row in rows if row["arch"] == "arch-a" and row["model"] == "vgg8"
|
||||
and row["raptor_pipeline"] == "4")
|
||||
if field == "pimcomp_functional_validation" and row[field] == value:
|
||||
value = "PASS"
|
||||
row[field] = value
|
||||
with pytest.raises(ValueError, match="inconsistent shared PIMCOMP batch results"):
|
||||
comparison.load_results(write_csv(tmp_path / "results.csv", fields, rows))
|
||||
|
||||
Reference in New Issue
Block a user