Exemplo n.º 1
0
 def test_that_for_different_images_calculated_ssim_is_below_min(self):
     ssim = compare_images(self.image_ones, self.image_zeros, 'subtask_id')
     self.assertTrue(ssim < settings.VERIFIER_MIN_SSIM)
Exemplo n.º 2
0
 def test_that_method_raise_verification_error_when_images_have_diffrent_sizes(
         self):
     with self.assertRaises(VerificationError):
         compare_images(self.image_ones, self.image_diffrent_size,
                        'subtask_id')
Exemplo n.º 3
0
 def test_that_for_the_same_images_metod_produces_ssim_equal_one(self):
     ssim = compare_images(self.image_ones, self.image_ones, 'subtask_id')
     self.assertEqual(ssim, 1.0)