From 89904a5bad9bce83016e4902586bbed5af3834ca Mon Sep 17 00:00:00 2001 From: Colin Maudry Date: Sun, 19 Apr 2026 22:30:28 +0200 Subject: [PATCH] test: scaffold unit tests for table utilities (#72) --- tests/test_table.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/test_table.py diff --git a/tests/test_table.py b/tests/test_table.py new file mode 100644 index 0000000..8e08e44 --- /dev/null +++ b/tests/test_table.py @@ -0,0 +1,32 @@ +import polars as pl +import pytest + + +@pytest.fixture +def sample_lff(): + """Small LazyFrame with the columns needed by add_links / format_values.""" + return pl.LazyFrame( + [ + { + "uid": "u1", + "id": "u1", + "acheteur_id": "12345678900011", + "acheteur_nom": "Mairie de Test", + "titulaire_id": "98765432100022", + "titulaire_nom": "Entreprise Test", + "titulaire_typeIdentifiant": "SIRET", + "objet": "Travaux divers", + "montant": 12500.0, + "dateNotification": "2025-03-15", + "codeCPV": "45000000", + "dureeRestanteMois": 6, + "titulaire_distance": 42.0, + } + ] + ) + + +def test_table_module_imports(): + from src.utils import table + + assert hasattr(table, "prepare_table_data")