From c826db092f406f0e00779dd82b0e2b95b4d35e84 Mon Sep 17 00:00:00 2001
From: Scott Talbert <swt@techie.net>
Date: Tue, 29 Mar 2022 20:25:15 -0400
Subject: [PATCH] Skip tests that fail on big-endian architectures

Bug-Upstream: https://github.com/pygame/pygame/issues/3098
---
 test/gfxdraw_test.py | 1 +
 test/image_test.py   | 2 ++
 test/mixer_test.py   | 1 +
 3 files changed, 4 insertions(+)

diff --git a/test/gfxdraw_test.py b/test/gfxdraw_test.py
index 293cef3..add372a 100644
--- a/test/gfxdraw_test.py
+++ b/test/gfxdraw_test.py
@@ -693,6 +693,7 @@ class GfxdrawDefaultTest(unittest.TestCase):
             for posn in bg_test_points:
                 self.check_at(surf, posn, bg_adjusted)
 
+    @unittest.skipIf(pygame.get_sdl_byteorder() == pygame.BIG_ENDIAN, "big endian")
     def test_aapolygon(self):
         """aapolygon(surface, points, color): return None"""
         fg = self.foreground_color
diff --git a/test/image_test.py b/test/image_test.py
index a3522fb..177d850 100644
--- a/test/image_test.py
+++ b/test/image_test.py
@@ -94,6 +94,7 @@ class ImageModuleTest(unittest.TestCase):
                     img_file = io.BytesIO(img_bytes)
                     image = pygame.image.load(img_file)
 
+    @unittest.skipIf(pygame.get_sdl_byteorder() == pygame.BIG_ENDIAN, "big endian")
     def testSaveJPG(self):
         """JPG equivalent to issue #211 - color channel swapping
 
@@ -1015,6 +1016,7 @@ class ImageModuleTest(unittest.TestCase):
 
         f.close()
 
+    @unittest.skipIf(pygame.get_sdl_byteorder() == pygame.BIG_ENDIAN, "big endian")
     def test_load_extended(self):
         """can load different format images.
 
diff --git a/test/mixer_test.py b/test/mixer_test.py
index 0d5985d..032e9cf 100644
--- a/test/mixer_test.py
+++ b/test/mixer_test.py
@@ -89,6 +89,7 @@ class MixerModuleTest(unittest.TestCase):
         mixer.init(0, 0, 0)
         self.assertEqual(mixer.get_init(), (44100, 8, 1))
 
+    @unittest.skipIf(pygame.get_sdl_byteorder() == pygame.BIG_ENDIAN, "big endian")
     def test_get_init__returns_exact_values_used_for_init(self):
         # TODO: size 32 fails in this test (maybe SDL_mixer bug)
 
-- 
2.35.1

