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)
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')
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)