-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
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.
- ✅
pytestpasses in remote CI - ✅
pytestpasses locally in serial run (1 core) - ❌
pytestfails locally inxdistrun (multicore) - ❌ 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:
point_setcreate 50 points; andrand_tuplecreate 1 point
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) == 1cc @gegen07
Edit 1
I have seen failure in local serial testing, but it is not consistent.
FAILED fastpair/tests/test_fastpair.py::TestFastPairUpdatePointLessPoints::test_basic - assert 9 == 1