def test_neighbors(): for c, h in pairs: for pre in xrange(-1, -(len(h) - 6), -1): ph = h[:pre] ns = geoprint.neighbors(ph) for b, n in ns: assert geoprint.adjacent(ph, n), (ph, n)
def test_not_adjacent(): assert not geoprint.adjacent(phash, lhash)
def test_neighbors(): for c, h in pairs: for pre in xrange(-1, -(len(h) - 6), -1): ph = h[:pre] ns = geoprint.neighbors(ph) for b, n in ns: assert geoprint.adjacent(ph, n), (ph, n)
def test_not_adjacent(): assert not geoprint.adjacent(phash, lhash)