Skip to content

Commit

Permalink
Merge pull request #1997 from wiredfool/32bit_test_precision
Browse files Browse the repository at this point in the history
Fix 2 more failing tests on 32 bit due to float precision
  • Loading branch information
wiredfool committed Jun 30, 2016
2 parents 92660a1 + c057c42 commit da04d32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/test_imagecms.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def truncate_tuple(tuple_or_float):
self.assertEqual(p.attributes, 4294967296)
assert_truncated_tuple_equal(p.blue_colorant, ((0.14306640625, 0.06060791015625, 0.7140960693359375), (0.1558847490315394, 0.06603820639433387, 0.06060791015625)))
assert_truncated_tuple_equal(p.blue_primary, ((0.14306641366715667, 0.06060790921083026, 0.7140960805782015), (0.15588475410450106, 0.06603820408959558, 0.06060790921083026)))
self.assertEqual(p.chromatic_adaptation, (((1.04791259765625, 0.0229339599609375, -0.050201416015625), (0.02960205078125, 0.9904632568359375, -0.0170745849609375), (-0.009246826171875, 0.0150604248046875, 0.7517852783203125)), ((1.0267159024652783, 0.022470062342089134, 0.0229339599609375), (0.02951378324103937, 0.9875098886387147, 0.9904632568359375), (-0.012205438066465256, 0.01987915407854985, 0.0150604248046875))))
assert_truncated_tuple_equal(p.chromatic_adaptation, (((1.04791259765625, 0.0229339599609375, -0.050201416015625), (0.02960205078125, 0.9904632568359375, -0.0170745849609375), (-0.009246826171875, 0.0150604248046875, 0.7517852783203125)), ((1.0267159024652783, 0.022470062342089134, 0.0229339599609375), (0.02951378324103937, 0.9875098886387147, 0.9904632568359375), (-0.012205438066465256, 0.01987915407854985, 0.0150604248046875))))
self.assertEqual(p.chromaticity, None)
self.assertEqual(p.clut, {0: (False, False, True), 1: (False, False, True), 2: (False, False, True), 3: (False, False, True)})
self.assertEqual(p.color_space, 'RGB')
Expand All @@ -298,7 +298,7 @@ def truncate_tuple(tuple_or_float):
self.assertEqual(p.manufacturer, None)
assert_truncated_tuple_equal(p.media_black_point, ((0.012054443359375, 0.0124969482421875, 0.01031494140625), (0.34573304157549234, 0.35842450765864337, 0.0124969482421875)))
assert_truncated_tuple_equal(p.media_white_point, ((0.964202880859375, 1.0, 0.8249053955078125), (0.3457029219802284, 0.3585375327567059, 1.0)))
self.assertEqual(p.media_white_point_temperature, 5000.722328847392)
assert_truncated_tuple_equal((p.media_white_point_temperature,), (5000.722328847392,))
self.assertEqual(p.model, 'IEC 61966-2-1 Default RGB Colour Space - sRGB')
self.assertEqual(p.pcs, 'XYZ')
self.assertEqual(p.perceptual_rendering_intent_gamut, None)
Expand Down

0 comments on commit da04d32

Please sign in to comment.