50 lines
1.3 KiB
Python
50 lines
1.3 KiB
Python
"""Tests for rex.express — narwhals cleaning transforms (NotImplementedError stubs)."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import polars as pl
|
|
import pytest
|
|
|
|
from rex.express import (
|
|
clean_eligibility,
|
|
clean_medical_claim,
|
|
clean_pharmacy_claim,
|
|
parse_mainframe_date,
|
|
unpack_comp3,
|
|
)
|
|
|
|
|
|
class TestCleanMedicalClaim:
|
|
def test_raises_not_implemented(self) -> None:
|
|
df = pl.DataFrame({"x": ["a"]})
|
|
with pytest.raises(NotImplementedError):
|
|
clean_medical_claim(df)
|
|
|
|
|
|
class TestCleanEligibility:
|
|
def test_raises_not_implemented(self) -> None:
|
|
df = pl.DataFrame({"x": ["a"]})
|
|
with pytest.raises(NotImplementedError):
|
|
clean_eligibility(df)
|
|
|
|
|
|
class TestCleanPharmacyClaim:
|
|
def test_raises_not_implemented(self) -> None:
|
|
df = pl.DataFrame({"x": ["a"]})
|
|
with pytest.raises(NotImplementedError):
|
|
clean_pharmacy_claim(df)
|
|
|
|
|
|
class TestParseMainframeDate:
|
|
def test_raises_not_implemented(self) -> None:
|
|
df = pl.DataFrame({"dt": ["20240115"]})
|
|
with pytest.raises(NotImplementedError):
|
|
parse_mainframe_date(df, column="dt")
|
|
|
|
|
|
class TestUnpackComp3:
|
|
def test_raises_not_implemented(self) -> None:
|
|
df = pl.DataFrame({"val": ["123C"]})
|
|
with pytest.raises(NotImplementedError):
|
|
unpack_comp3(df, column="val", scale=2)
|