test(monitoring): avoid script bytecode cleanup noise
All checks were successful
Code Review / ai-code-review (push) Successful in 10s
CD Pipeline / tests (push) Successful in 3m54s
CD Pipeline / build-and-deploy (push) Successful in 3m32s
CD Pipeline / post-deploy-checks (push) Successful in 1m47s

This commit is contained in:
Your Name
2026-05-20 12:48:30 +08:00
parent 8fa8d690a2
commit 6e5d68eebc

View File

@@ -1,6 +1,7 @@
from __future__ import annotations
import importlib.util
import sys
import unittest
from pathlib import Path
@@ -9,6 +10,7 @@ SCRIPT_PATH = Path(__file__).resolve().parents[3] / "scripts" / "generate_monito
SPEC = importlib.util.spec_from_file_location("generate_monitoring", SCRIPT_PATH)
generate_monitoring = importlib.util.module_from_spec(SPEC)
assert SPEC and SPEC.loader
sys.dont_write_bytecode = True
SPEC.loader.exec_module(generate_monitoring)