Files
fxhnt/tests/unit/test_warehouse_catalog_format.py
2026-06-15 00:34:55 +02:00

16 lines
604 B
Python

"""The catalog formatter renders the SSOT inventory as a readable table."""
from __future__ import annotations
from fxhnt.application.warehouse_catalog import format_catalog
def test_format_catalog_renders_symbols_and_dates() -> None:
out = format_catalog([("ES", 2, 0, 86_400), ("NQ", 1, 86_400, 86_400)])
assert "ES" in out and "NQ" in out
assert "1970-01-01" in out and "1970-01-02" in out # ts 0 and 86400 as ISO days
assert "2" in out # ES bar count
def test_format_catalog_empty() -> None:
assert "empty" in format_catalog([]).lower()