Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
unittest comparing CellId.walk() and CellId.walk_fast() (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
svenkreiss committed Jun 15, 2016
1 parent 494dc8e commit 30b9921
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/sphere_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,11 @@ def testContainment(self):
cells[i].contains(cells[j]) or
cells[j].contains(cells[i]))

def test_walk_fast_and_slow(self):
slow = [c.to_token() for c in CellId.walk(2)]
fast = [c.to_token() for c in CellId.walk_fast(2)]
self.assertEqual(slow, fast)

def testContinuity(self):
# Make sure that sequentially increasing cell ids form a continuous
# path over the surface of the sphere, i.e. there are no
Expand Down

0 comments on commit 30b9921

Please sign in to comment.