Skip to content

Commit

Permalink
Test that MMX/SSE backends emit deprecation warning
Browse files Browse the repository at this point in the history
*If they are even possible to set
  • Loading branch information
Starbuck5 committed Nov 24, 2023
1 parent e608dd9 commit 3d328a8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/transform_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,14 @@ def change():
filter_type = pygame.transform.get_smoothscale_backend()
self.assertEqual(filter_type, original_type)

try:
with self.assertWarns(DeprecationWarning):
pygame.transform.set_smoothscale_backend("MMX")
with self.assertWarns(DeprecationWarning):
pygame.transform.set_smoothscale_backend("SSE")
except ValueError:
pass # Backends not supported on this CPU, also valid

def test_chop(self):
original_surface = pygame.Surface((20, 20))
pygame.draw.rect(original_surface, (255, 0, 0), (0, 0, 10, 10))
Expand Down

0 comments on commit 3d328a8

Please sign in to comment.