adding: OUTPUT_FILENAME_PATTERN
This commit is contained in:
0
tests/__init__.py
Normal file → Executable file
0
tests/__init__.py
Normal file → Executable file
0
tests/__pycache__/__init__.cpython-313.pyc
Normal file → Executable file
0
tests/__pycache__/__init__.cpython-313.pyc
Normal file → Executable file
0
tests/__pycache__/test_full_tim_compliance.cpython-313-pytest-9.0.2.pyc
Normal file → Executable file
0
tests/__pycache__/test_full_tim_compliance.cpython-313-pytest-9.0.2.pyc
Normal file → Executable file
0
tests/__pycache__/test_monitor_and_run_id.cpython-313-pytest-9.0.2.pyc
Normal file → Executable file
0
tests/__pycache__/test_monitor_and_run_id.cpython-313-pytest-9.0.2.pyc
Normal file → Executable file
0
tests/__pycache__/test_no_product_hardcodes.cpython-313-pytest-9.0.2.pyc
Normal file → Executable file
0
tests/__pycache__/test_no_product_hardcodes.cpython-313-pytest-9.0.2.pyc
Normal file → Executable file
0
tests/__pycache__/test_tim_spec.cpython-313-pytest-9.0.2.pyc
Normal file → Executable file
0
tests/__pycache__/test_tim_spec.cpython-313-pytest-9.0.2.pyc
Normal file → Executable file
0
tests/test_full_tim_compliance.py
Normal file → Executable file
0
tests/test_full_tim_compliance.py
Normal file → Executable file
0
tests/test_monitor_and_run_id.py
Normal file → Executable file
0
tests/test_monitor_and_run_id.py
Normal file → Executable file
0
tests/test_no_product_hardcodes.py
Normal file → Executable file
0
tests/test_no_product_hardcodes.py
Normal file → Executable file
16
tests/test_tim_spec.py
Normal file → Executable file
16
tests/test_tim_spec.py
Normal file → Executable file
@@ -10,7 +10,7 @@ from evaluator.config.agents import load_agents
|
||||
from evaluator.core.models import ConversationRecord
|
||||
from evaluator.engine import EvaluationEngine
|
||||
from evaluator.judges.llm_judge import TIMStyleLLMJudge
|
||||
from evaluator.output.legacy_exporter import extract_prompt_length
|
||||
from evaluator.output.legacy_exporter import build_output_filename, extract_prompt_length
|
||||
from evaluator.time_utils import brt_day_window, to_utc_z
|
||||
|
||||
|
||||
@@ -25,6 +25,20 @@ class FakeLLM:
|
||||
|
||||
|
||||
class TIMSpecTests(unittest.TestCase):
|
||||
def test_output_filename_pattern_is_configurable(self):
|
||||
now_brt = datetime(2026, 9, 9, 18, 45, 12)
|
||||
filename = build_output_filename(
|
||||
"billing",
|
||||
"run-123",
|
||||
now_brt,
|
||||
pattern="judge_{agent_id}_{run_id}_{timestamp}.csv.gz",
|
||||
)
|
||||
self.assertEqual(filename, "judge_billing_run-123_20260909_184512.csv.gz")
|
||||
|
||||
def test_output_filename_pattern_rejects_directories(self):
|
||||
with self.assertRaisesRegex(ValueError, "without directories"):
|
||||
build_output_filename("billing", "run-123", datetime.now(), pattern="../{run_id}.gz")
|
||||
|
||||
def test_brt_day_converts_to_expected_utc(self):
|
||||
start, end = brt_day_window(date(2026, 8, 12))
|
||||
self.assertEqual(to_utc_z(start), "2026-08-12T03:00:00Z")
|
||||
|
||||
Reference in New Issue
Block a user