Skip to content

Commit 76be4dd

Browse files
CopilotDaveSkender
andauthored
fix: resolve CI failures - split compound assert and fix exception type in test
Agent-Logs-Url: https://github.com/facioquo/stock-indicators-python/sessions/6e906527-fd07-4d0b-9be6-0e0bcfa6aa1e Co-authored-by: DaveSkender <8432125+DaveSkender@users.noreply.github.com>
1 parent 66e251c commit 76be4dd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/common/test_decimal_conversion_comparison.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from stock_indicators._cstypes import Decimal as CsDecimal
88
from stock_indicators._cstypes.decimal import to_pydecimal, to_pydecimal_via_double
9+
from stock_indicators.exceptions import TypeConversionError
910

1011

1112
class TestDecimalConversionComparison:
@@ -150,11 +151,12 @@ def test_edge_cases_conversion_comparison(self):
150151
if string_result != double_result:
151152
print(f" Difference: {abs(string_result - double_result)}")
152153

153-
assert string_result is not None and double_result is not None
154+
assert string_result is not None
155+
assert double_result is not None
154156

155157
def test_edge_case_infinity_raises(self):
156158
"""Test that infinity raises an exception."""
157-
with pytest.raises(ValueError, match=r"."):
159+
with pytest.raises(TypeConversionError, match=r"."):
158160
CsDecimal(float("inf"))
159161

160162
def test_none_input_handling(self):

0 commit comments

Comments
 (0)