8000 Use approximate comparison for single max/min value comparison · pythonnet/pythonnet@8bc458b · GitHub
[go: up one dir, main page]

Skip to content

Commit 8bc458b

Browse files
committed
Use approximate comparison for single max/min value comparison
1 parent 67032ea commit 8bc458b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_conversion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,8 @@ def test_uint64_conversion():
406406

407407
def test_single_conversion():
408408
"""Test single conversion."""
409-
assert System.Single.MaxValue == 3.402823e38
410-
assert System.Single.MinValue == -3.402823e38
409+
assert System.Single.MaxValue == pytest.approx(3.402823e38)
410+
assert System.Single.MinValue == pytest.approx(-3.402823e38)
411411

412412
ob = ConversionTest()
413413
assert ob.SingleField == 0.0

0 commit comments

Comments
 (0)
0