comparison tests/test_bisect.py @ 14:27925261c137

fix broken tests including an aggregious case where we add ourselves as a neighbor to ourself
author Jeff Hammel <k0scist@gmail.com>
date Sun, 25 Jun 2017 14:29:18 -0700
parents e3d6919130ca
children
comparison
equal deleted inserted replaced
13:94af113e498a 14:27925261c137
23 k) 23 k)
24 # since k is < 15000 24 # since k is < 15000
25 assert len(_distances) == k 25 assert len(_distances) == k
26 ordered = [value[-1] for value in _distances] 26 ordered = [value[-1] for value in _distances]
27 assert sorted(ordered) == ordered 27 assert sorted(ordered) == ordered
28 keys = [value[0] for value in _distances]
29 assert len(set(keys)) == len(_distances)
28 30
29 31
30 if __name__ == '__main__': 32 if __name__ == '__main__':
31 unittest.main() 33 unittest.main()