Skip to content

Commit

Permalink
Merge pull request #3494 from Temmie3754/main
Browse files Browse the repository at this point in the history
Relax strict pixel match tests in test_src_alpha_sdl2_blitter by allowing a small delta
  • Loading branch information
Ankith committed Oct 16, 2022
2 parents 40b8f9d + 32c1e1b commit 31f9004
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/surface_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1586,12 +1586,14 @@ def test_src_alpha_sdl2_blitter(self):
src_surf, (0, 0), special_flags=pygame.BLEND_ALPHA_SDL2
)
key = ((dst_r, dst_b, dst_a), (src_r, src_b, src_a))
results[key] = dest_surf.get_at((65, 33))
self.assertEqual(results[key], results_expected[key])
results[key] = tuple(dest_surf.get_at((65, 33)))
for i in range(4):
self.assertAlmostEqual(
results[key][i], results_expected[key][i], delta=4
)

# print("(dest_r, dest_b, dest_a), (src_r, src_b, src_a): color")
# pprint(results)
self.assertEqual(results, results_expected)

def test_opaque_destination_blit_with_set_alpha(self):
# no set_alpha()
Expand Down

0 comments on commit 31f9004

Please sign in to comment.