Within test_update_point_less_points(), I am not sure this final assert is testing what it's supposed to and I am concerned about it currently passing.
:x: the code chunk broken out and run in jupyterlab
From what I understand, the final assert statement should be testing number of point currently in fp, and that should not be 1 because we are only adding points to fp and then updating a single point, never removing any points, where:
So I think the final line here should pass with assert len(fp) == 9, but it somehow passes with assert len(fp) == 1 in the ✅ above...
def test_update_point_less_points(self, point_set):
ps = point_set
fp = FastPair()
for p in ps[:9]:
fp += p
assert fp.initialized is False
old = ps[0] # Just grab the first point...
new = rand_tuple(len(ps[0]))
fp._update_point(old, new)
assert len(fp) == 1
cc @gegen07
Edit 1
I have seen failure in local serial testing, but it is not consistent.
Within
test_update_point_less_points()
, I am not sure this finalassert
is testing what it's supposed to and I am concerned about it currently passing.pytest
passes in remote CIpytest
passes locally in serial run (1 core)pytest
fails locally inxdist
run (multicore)From what I understand, the final
assert
statement should be testing number of point currently infp
, and that should not be1
because we are only adding points tofp
and then updating a single point, never removing any points, where:point_set
create 50 points; andrand_tuple
create 1 pointSo I think the final line here should pass with
assert len(fp) == 9
, but it somehow passes withassert len(fp) == 1
in the ✅ above...cc @gegen07
Edit 1
I have seen failure in local serial testing, but it is not consistent.