fix: destroy charts when switching tabs

This commit is contained in:
Jordan Wages 2025-07-19 17:03:48 -05:00
commit 297c913f2a
7 changed files with 22 additions and 18 deletions

View file

@ -15,10 +15,10 @@ def sample_logs(tmp_path):
log_dir.mkdir(parents=True, exist_ok=True)
(log_dir / "access.log.1").write_text(
"127.0.0.1 - example.com [01/Jan/2024:10:00:00 +0000] \"GET / HTTP/1.1\" 200 123 \"-\" \"curl\" MISS\n"
'127.0.0.1 - example.com [01/Jan/2024:10:00:00 +0000] "GET / HTTP/1.1" 200 123 "-" "curl" MISS\n'
)
(log_dir / "access.log").write_text(
"127.0.0.1 - example.com [01/Jan/2024:10:05:00 +0000] \"GET /about HTTP/1.1\" 200 123 \"-\" \"curl\" MISS\n"
'127.0.0.1 - example.com [01/Jan/2024:10:05:00 +0000] "GET /about HTTP/1.1" 200 123 "-" "curl" MISS\n'
)
yield log_dir
@ -59,4 +59,3 @@ def test_idempotent_import(sample_logs, tmp_path):
assert first_count == 2
assert second_count == first_count

View file

@ -67,4 +67,3 @@ server {
assert servers[1]["server_name"] == "example.org"
assert servers[1]["listen"] == "443 ssl"
assert "proxy_cache" not in servers[1]

View file

@ -14,7 +14,7 @@ def test_script_invokes_commands(tmp_path):
calls = tmp_path / "calls.txt"
python_stub = tmp_path / "python"
python_stub.write_text(f"#!/usr/bin/env bash\necho \"$*\" >> \"{calls}\"\n")
python_stub.write_text(f'#!/usr/bin/env bash\necho "$*" >> "{calls}"\n')
python_stub.chmod(0o755)
(tmp_path / "python3").write_text(f"#!/usr/bin/env bash\nexit 0\n")
(tmp_path / "python3").chmod(0o755)