Skip to content

Commit e5c2129

Browse files
committed
tests: compare with nan allowed
1 parent d3c5125 commit e5c2129

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_accumulators.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ def test_sum_mean(list1, list2):
115115

116116
ab = a + b
117117
assert ab.value == approx(c.value)
118-
assert ab.variance == approx(c.variance)
118+
assert ab.variance == approx(c.variance, nan_ok=True)
119119
assert ab.count == approx(c.count)
120120

121121
a += b
122122
assert a.value == approx(c.value)
123-
assert a.variance == approx(c.variance)
123+
assert a.variance == approx(c.variance, nan_ok=True)
124124
assert a.count == approx(c.count)
125125

126126

@@ -151,12 +151,12 @@ def test_sum_weighed_mean(pair1, pair2):
151151

152152
ab = a + b
153153
assert ab.value == approx(c.value)
154-
assert ab.variance == approx(c.variance)
154+
assert ab.variance == approx(c.variance, nan_ok=True)
155155
assert ab.sum_of_weights == approx(c.sum_of_weights)
156156
assert ab.sum_of_weights_squared == approx(c.sum_of_weights_squared)
157157

158158
a += b
159159
assert a.value == approx(c.value)
160-
assert a.variance == approx(c.variance)
160+
assert a.variance == approx(c.variance, nan_ok=True)
161161
assert a.sum_of_weights == approx(c.sum_of_weights)
162162
assert a.sum_of_weights_squared == approx(c.sum_of_weights_squared)

0 commit comments

Comments
 (0)