Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax strict pixel match tests in test_src_alpha_sdl2_blitter by allowing a small delta #3494

Merged
merged 4 commits into from
Oct 16, 2022
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/surface_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1586,12 +1586,12 @@ 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