Skip to content

Commit

Permalink
Fix gradient test
Browse files Browse the repository at this point in the history
  • Loading branch information
MyreMylar committed Apr 6, 2023
1 parent cdd0c7f commit e404e04
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_core/test_colour_gradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ def test_apply_gradient_to_surface(self, _init_pygame):
gradient.apply_gradient_to_surface(test_surface)

after_application_colour = test_surface.get_at((0, 0))
assert after_application_colour == pygame.Color(0, 11, 243, 255)
if pygame.vernum.major >= 2 and pygame.vernum.minor >= 2:
# The scaling algorithm changed slightly in 2.2, this affects the gradient color
assert after_application_colour == pygame.Color(0, 5, 249, 255)
else:
assert after_application_colour == pygame.Color(0, 11, 243, 255)


if __name__ == '__main__':
Expand Down

0 comments on commit e404e04

Please sign in to comment.