Exemplo n.º 1
0
def run_pf(path):
    """Function to pass to the process pool executor to process picket fence images."""
    try:
        mypf = PicketFence(path)
        mypf.analyze()
        return 'Success'
    except:
        return 'Failure at {}'.format(path)
def run_pf(path):
    """Function to pass to the process pool executor to process picket fence images."""
    try:
        mypf = PicketFence(path)
        mypf.analyze()
        return 'Success'
    except:
        return 'Failure at {}'.format(path)
Exemplo n.º 3
0
 def test_lower_tolerance_fails(self):
     """This image has an introduced error; this should catch with a reasonable tolerance."""
     pf = PicketFence(self.im_path)
     pf.analyze(tolerance=0.3, hdmlc=self.hdmlc)
     self.assertFalse(pf.passed)
Exemplo n.º 4
0
 def setUpClass(cls):
     cls.pf = PicketFence(cls.file_path)
     cls.pf.analyze(hdmlc=cls.hdmlc, num_pickets=cls.num_pickets)
Exemplo n.º 5
0
 def test_lower_tolerance_fails(self):
     """This image has an introduced error; this should catch with a reasonable tolerance."""
     pf = PicketFence(self.file_path)
     pf.analyze(tolerance=0.3, hdmlc=self.hdmlc)
     self.assertFalse(pf.passed)