示例#1
0
 def test_image_inverted(self):
     """Check that the demo image was actually inverted, as it needs to be."""
     star = Starshot.from_demo_image()
     top_left_corner_val_before = star.image.array[0, 0]
     star.image.check_inversion_by_histogram(percentiles=[4, 50, 96])
     top_left_corner_val_after = star.image.array[0, 0]
     self.assertNotEqual(top_left_corner_val_before, top_left_corner_val_after)
示例#2
0
 def test_image_inverted(self):
     """Check that the demo image was actually inverted, as it needs to be."""
     star = Starshot.from_demo_image()
     top_left_corner_val_before = star.image.array[0, 0]
     star._check_image_inversion()
     top_left_corner_val_after = star.image.array[0, 0]
     self.assertNotEqual(top_left_corner_val_before, top_left_corner_val_after)
示例#3
0
 def setUp(self):
     self.star = Starshot.from_demo_image()
     self.star.analyze()
示例#4
0
 def test_fails_with_tight_tol(self):
     star = Starshot.from_demo_image()
     star.analyze(tolerance=0.1)
     self.assertFalse(star.passed)
示例#5
0
 def construct_star(cls):
     return Starshot.from_demo_image()
示例#6
0
 def setUp(self):
     self.star = Starshot.from_demo_image()
     self.star.analyze()
示例#7
0
 def test_fails_with_tight_tol(self):
     star = Starshot.from_demo_image()
     star.analyze(tolerance=0.1)
     self.assertFalse(star.passed)
示例#8
0
 def construct_star(cls):
     return Starshot.from_demo_image()