Skip to content

Commit ed03a44

Browse files
committed
MAINT: add more pytest.approx calls
These tests failed on Debian i386, probably due to x87 excess precision: https://bugs.debian.org/1103140
1 parent 81880e7 commit ed03a44

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

momepy/tests/test_dimension.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def test_StreetProfile(self):
215215
self.df_streets, self.df_buildings, heights=height, tick_length=100
216216
)
217217
assert results2.w[0] == 70.7214870365335
218-
assert results2.wd[0] == 8.50508193935929
218+
assert results2.wd[0] == pytest.approx(8.50508193935929)
219219
assert results2.h[0] == pytest.approx(23.87158296249206)
220220
assert results2.p[0] == pytest.approx(0.3375435664999579)
221221
assert results2.o[0] == 0.5769230769230769

momepy/tests/test_intensity.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def test_NodeDensity(self):
205205
nodes, edges, sw, weighted=True, node_degree="degree"
206206
).series
207207
array = mm.NodeDensity(nodes, edges, W).series
208-
assert density.mean() == 0.005534125924228438
208+
assert density.mean() == pytest.approx(0.005534125924228438)
209209
assert weighted.mean() == pytest.approx(0.010090861332429164)
210210
assert array.mean() == 0.01026753724860306
211211

0 commit comments

Comments
 (0)