From 979efd01b0c61d493d1fef3dff9885f5d38a8975 Mon Sep 17 00:00:00 2001 From: Max Nanis Date: Mon, 24 Aug 2026 16:04:11 -0700 Subject: ruff + fix filepath_adapter --- tests/models/test_currency.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'tests/models/test_currency.py') diff --git a/tests/models/test_currency.py b/tests/models/test_currency.py index 40cff88..1102717 100644 --- a/tests/models/test_currency.py +++ b/tests/models/test_currency.py @@ -14,7 +14,7 @@ class TestUSDCentModel: def test_construct_int(self): from generalresearch.currency import USDCent - for i in range(100): + for _ in range(100): int_val = randint(0, 999_999) instance = USDCent(int_val) assert int_val == instance @@ -102,7 +102,7 @@ class TestUSDCentModel: instance = USDCent(int_val) with pytest.raises(expected_exception=ValueError) as cm: - instance - USDCent(1_000_000) + _ = instance - USDCent(1_000_000) assert "USDCent not be less than zero" in str(cm.value) @@ -147,16 +147,16 @@ class TestUSDCentModel: instance = USDCent(int_val) with pytest.raises(expected_exception=AssertionError): - instance + 0.10 + _ = instance + 0.10 with pytest.raises(expected_exception=AssertionError): - instance + Decimal(".10") + _ = instance + Decimal(".10") with pytest.raises(expected_exception=AssertionError): - instance + "9.9" + _ = instance + "9.9" with pytest.raises(expected_exception=AssertionError): - instance + True + _ = instance + True def test_abs(self): from generalresearch.currency import USDCent @@ -248,6 +248,8 @@ class TestUSDMillModel: decimal_val: Decimal = Decimal("10.6789") instance = USDMill(decimal_val) + assert isinstance(instance, USDMill) + assert len(record) == 1 assert ( "USDMill init with a Decimal. Rounding behavior may be unexpected" -- cgit v1.2.3