def count_test_1(): test_array = np.array([0, 1, 0]) exp_count = 1 obs_count = cr.count_rings(test_array) assert (exp_count == obs_count)
def test_medium_noise_img(): im = generate_image(2, 0.2) edge_test = ed.detect_edge(im, sigma=3) profile = pp.pick_profile(edge_test) ring_number = cr.count_rings(profile) assert (ring_number == 1)
def test_high_noise_img(): im = generate_image(4, 0.5) edge_test = ed.detect_edge(im, sigma=6) profile = pp.pick_profile(edge_test) ring_number = cr.count_rings(profile) assert (ring_number == 1)
def test_clean_img(): im = generate_image() edge_test = ed.detect_edge(im, sigma=2) profile = pp.pick_profile(edge_test) ring_number = cr.count_rings(profile) assert (ring_number == 1)