Chiusura fase di ristrutturazione e modularizzazione del workflow per favorire sviluppo modulare
This commit is contained in:
@@ -7,7 +7,7 @@ and the ledger I/O (load/append, tolerant of JSON-array and JSONL formats).
|
||||
Pure logic, no DB.
|
||||
"""
|
||||
import json
|
||||
from datetime import date, datetime
|
||||
from datetime import UTC, date, datetime
|
||||
from decimal import Decimal
|
||||
|
||||
import pytest
|
||||
@@ -82,10 +82,10 @@ def test_build_test_sql_single_cte():
|
||||
# --- ledger I/O: load_cte_tests / append_cte_test ---------------------------
|
||||
|
||||
def _record(**kw) -> CteTestRecord:
|
||||
base = dict(
|
||||
name="ablazione_q", ts=datetime(2025, 1, 1, 12, 0), sql_hash="abc123",
|
||||
status="ok", columns=["x"], row_sample=5, execution_ms=42,
|
||||
)
|
||||
base = {
|
||||
"name": "ablazione_q", "ts": datetime(2025, 1, 1, 12, 0, tzinfo=UTC), "sql_hash": "abc123",
|
||||
"status": "ok", "columns": ["x"], "row_sample": 5, "execution_ms": 42,
|
||||
}
|
||||
base.update(kw)
|
||||
return CteTestRecord(**base)
|
||||
|
||||
@@ -147,7 +147,7 @@ def test_jsonable_passes_through_native_types():
|
||||
def test_jsonable_coerces_decimal_and_date_to_str():
|
||||
assert _jsonable(Decimal("12.34")) == "12.34"
|
||||
assert _jsonable(date(2025, 1, 1)) == "2025-01-01"
|
||||
assert _jsonable(datetime(2025, 1, 1, 12, 0, 0)) == "2025-01-01 12:00:00"
|
||||
assert _jsonable(datetime(2025, 1, 1, 12, 0, 0)) == "2025-01-01 12:00:00" # noqa: DTZ001
|
||||
|
||||
|
||||
def test_jsonable_truncates_long_strings():
|
||||
|
||||
Reference in New Issue
Block a user