Skip to content

Commit 7674867

Browse files
committed
Also skip namehint variant
1 parent 37ace5d commit 7674867

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

test/mixer_music_test.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,33 @@ def test_object_namehint(self):
9393
"house_lo.ogg",
9494
"house_lo.wav",
9595
"house_lo.mp3",
96+
]
97+
data_fname = example_path("data")
98+
for file in filenames:
99+
path = os.path.join(data_fname, file)
100+
if os.sep == "\\":
101+
path = path.replace("\\", "\\\\")
102+
bmusfn = path.encode()
103+
104+
*_, format = file.split(".")
105+
106+
# these two "with open" blocks need to be separate, which is kinda weird
107+
with open(bmusfn, "rb") as musf:
108+
pygame.mixer.music.load(musf, format)
109+
110+
with open(bmusfn, "rb") as musf:
111+
pygame.mixer.music.queue(musf, format)
112+
113+
with open(bmusfn, "rb") as musf:
114+
pygame.mixer.music.load(musf, namehint=format)
115+
116+
with open(bmusfn, "rb") as musf:
117+
pygame.mixer.music.queue(musf, namehint=format)
118+
119+
@unittest.skipIf(platform.system() == "Linux", "fails on Linux for some reason.")
120+
def test_object_namehint_xm(self):
121+
"""TODO: fix this on Linux and merge with test_object_namehint."""
122+
filenames = [
96123
"surfonasinewave.xm",
97124
]
98125
data_fname = example_path("data")

0 commit comments

Comments
 (0)