Skip to content

Commit

Permalink
reorder tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed May 1, 2024
1 parent 7499170 commit cd1e6d2
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/test_jump.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,18 +176,6 @@ def test_multiprocessing_big():
assert gdq[0, 4, 204, 6] == DQFLAGS['DO_NOT_USE'] #This value would have been 5 without the fix.


def test_find_simple_circle():
plane = np.zeros(shape=(5, 5), dtype=np.uint8)
plane[2, 2] = DQFLAGS['JUMP_DET']
plane[3, 2] = DQFLAGS['JUMP_DET']
plane[1, 2] = DQFLAGS['JUMP_DET']
plane[2, 3] = DQFLAGS['JUMP_DET']
plane[2, 1] = DQFLAGS['JUMP_DET']
circle = find_circles(plane, DQFLAGS['JUMP_DET'], 1)
assert circle[0][0] == pytest.approx((2, 2))
assert circle[0][1] == pytest.approx(1.0, 1e-3)


def test_find_simple_ellipse():
plane = np.zeros(shape=(5, 7), dtype=np.uint8)
plane[2, 1] = DQFLAGS['JUMP_DET']
Expand All @@ -204,6 +192,18 @@ def test_find_simple_ellipse():
assert ellipse[0][0] == pytest.approx((3, 2)) # center


def test_find_simple_circle():
plane = np.zeros(shape=(5, 5), dtype=np.uint8)
plane[2, 2] = DQFLAGS['JUMP_DET']
plane[3, 2] = DQFLAGS['JUMP_DET']
plane[1, 2] = DQFLAGS['JUMP_DET']
plane[2, 3] = DQFLAGS['JUMP_DET']
plane[2, 1] = DQFLAGS['JUMP_DET']
circle = find_circles(plane, DQFLAGS['JUMP_DET'], 1)
assert circle[0][0] == pytest.approx((2, 2))
assert circle[0][1] == pytest.approx(1.0, 1e-3)


def test_find_ellipse2():
plane = np.zeros(shape=(5, 5), dtype=np.uint8)
plane[1, :] = [0, DQFLAGS["JUMP_DET"], DQFLAGS["JUMP_DET"], DQFLAGS["JUMP_DET"], 0]
Expand Down

0 comments on commit cd1e6d2

Please sign in to comment.