コード例 #1
0
 def test_compute_rms(self, index1, index2, expected_rms):
     # Force loading of the software rendering reference images regardless of the
     # actual GL backend, since these should match the expected RMS values.
     with mock.patch.object(image_utils, 'BACKEND_STRING', new='software'):
         frames = list(image_utils.humanoid.iter_load())
     image1 = frames[index1]
     image2 = frames[index2]
     rms = image_utils.compute_rms(image1, image2)
     self.assertAlmostEqual(rms, expected_rms, places=3)
コード例 #2
0
 def test_compute_rms(self, index1, index2, expected_rms):
     frames = list(image_utils.humanoid.iter_load())
     image1 = frames[index1]
     image2 = frames[index2]
     rms = image_utils.compute_rms(image1, image2)
     self.assertAlmostEqual(rms, expected_rms, places=3)