fix: wrap long lines in tests to pass ruff E501 (>100 chars)

This commit is contained in:
MinaSaad1 2026-04-07 17:17:13 +02:00
parent 895e90d710
commit 93c4275848
2 changed files with 4 additions and 3 deletions

View file

@ -1017,7 +1017,8 @@ def test_page_set_background_writes_color(sample_report: Path) -> None:
def test_page_set_background_custom_transparency(sample_report: Path) -> None:
result = page_set_background(sample_report, "page1", "#0E1117", transparency=50)
assert result["transparency"] == 50
props = _read(sample_report / "pages" / "page1" / "page.json")["objects"]["background"][0]["properties"]
page_data = _read(sample_report / "pages" / "page1" / "page.json")
props = page_data["objects"]["background"][0]["properties"]
assert props["transparency"]["expr"]["Literal"]["Value"] == "50D"

View file

@ -233,8 +233,8 @@ def test_visual_add_no_empty_objects(report_with_page: Path) -> None:
visual_add(report_with_page, "test_page", "bar_chart", name="clean_bar")
vfile = report_with_page / "pages" / "test_page" / "visuals" / "clean_bar" / "visual.json"
data = json.loads(vfile.read_text(encoding="utf-8"))
assert "objects" not in data.get("visual", {}), \
"visual.json must not contain empty 'objects: {}' -- Desktop strips it and schema validators reject it"
# Desktop strips empty objects and schema validators reject it
assert "objects" not in data.get("visual", {})
# ---------------------------------------------------------------------------