Skip to content

Commit 14f4535

Browse files
committed
Skip wavpack tests with system deps
1 parent 4d4819d commit 14f4535

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

.github/workflows/build-ubuntu-coverage.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ jobs:
5454
# Pip now forces us to either make a venv or set this flag, so we will do
5555
# this
5656
PIP_BREAK_SYSTEM_PACKAGES: 1
57+
# We are using dependencies installed from apt
58+
PG_DEPS_FROM_SYSTEM: 1
5759

5860
steps:
5961
- uses: actions/checkout@v4.1.7

.github/workflows/build-ubuntu-sdist.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ jobs:
5454
# Pip now forces us to either make a venv or set this flag, so we will do
5555
# this
5656
PIP_BREAK_SYSTEM_PACKAGES: 1
57+
# We are using dependencies installed from apt
58+
PG_DEPS_FROM_SYSTEM: 1
5759

5860
steps:
5961
- uses: actions/checkout@v4.1.7

test/mixer_music_test.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ def test_load_flac(self):
4040
"|tags:music|"
4141
self.music_load("house_lo.flac")
4242

43+
# system installed SDL_mixer may not support wavpack
4344
@unittest.skipIf(
44-
pygame.mixer.get_sdl_mixer_version() < (2, 8, 0),
45+
pygame.mixer.get_sdl_mixer_version() < (2, 8, 0)
46+
or "PG_DEPS_FROM_SYSTEM" in os.environ,
4547
"WavPack support added in SDL_mixer 2.8.0",
4648
)
4749
def test_load_wv(self):
@@ -85,7 +87,10 @@ def test_load_object(self):
8587
if pygame.mixer.get_sdl_mixer_version() >= (2, 6, 0):
8688
filenames.append("house_lo.mp3")
8789

88-
if pygame.mixer.get_sdl_mixer_version() >= (2, 8, 0):
90+
if (
91+
pygame.mixer.get_sdl_mixer_version() >= (2, 8, 0)
92+
and "PG_DEPS_FROM_SYSTEM" not in os.environ
93+
):
8994
filenames.append("house_lo.wv")
9095

9196
if pygame.mixer.get_soundfont() is not None:
@@ -113,7 +118,10 @@ def test_object_namehint(self):
113118
if pygame.mixer.get_sdl_mixer_version() >= (2, 6, 0):
114119
filenames.append("house_lo.mp3")
115120

116-
if pygame.mixer.get_sdl_mixer_version() >= (2, 8, 0):
121+
if (
122+
pygame.mixer.get_sdl_mixer_version() >= (2, 8, 0)
123+
and "PG_DEPS_FROM_SYSTEM" not in os.environ
124+
):
117125
filenames.append("house_lo.wv")
118126

119127
if pygame.mixer.get_soundfont() is not None:
@@ -208,8 +216,10 @@ def test_queue_flac(self):
208216
filename = example_path(os.path.join("data", "house_lo.flac"))
209217
pygame.mixer.music.queue(filename)
210218

219+
# system installed SDL_mixer may not support wavpack
211220
@unittest.skipIf(
212-
pygame.mixer.get_sdl_mixer_version() < (2, 8, 0),
221+
pygame.mixer.get_sdl_mixer_version() < (2, 8, 0)
222+
or "PG_DEPS_FROM_SYSTEM" in os.environ,
213223
"WavPack support added in SDL_mixer 2.8.0",
214224
)
215225
def test_queue_wv(self):

0 commit comments

Comments
 (0)