Skip to content

Commit f7d9f6b

Browse files
committed
Readd xm now that mp3 is the suspected problem
1 parent 89c7523 commit f7d9f6b

File tree

1 file changed

+2
-48
lines changed

1 file changed

+2
-48
lines changed

test/mixer_music_test.py

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -54,25 +54,7 @@ def music_load(self, filename):
5454

5555
def test_load_object(self):
5656
"""test loading music from file-like objects."""
57-
filenames = ["house_lo.ogg", "house_lo.wav"]
58-
data_fname = example_path("data")
59-
for file in filenames:
60-
path = os.path.join(data_fname, file)
61-
if os.sep == "\\":
62-
path = path.replace("\\", "\\\\")
63-
bmusfn = path.encode()
64-
65-
with open(bmusfn, "rb") as musf:
66-
pygame.mixer.music.load(musf)
67-
68-
@unittest.skipIf(platform.system() == "Linux", "fails on Linux for some reason.")
69-
def test_load_object_xm(self):
70-
"""Duplicate of test_load_object so loading xm can be individually expected-failed.
71-
TODO: fix this behavior on Linux.
72-
"""
73-
filenames = [
74-
"surfonasinewave.xm",
75-
]
57+
filenames = ["house_lo.ogg", "house_lo.wav", "surfonasinewave.xm"]
7658
data_fname = example_path("data")
7759
for file in filenames:
7860
path = os.path.join(data_fname, file)
@@ -85,35 +67,7 @@ def test_load_object_xm(self):
8567

8668
def test_object_namehint(self):
8769
"""test loading & queuing music from file-like objects with namehint argument."""
88-
filenames = ["house_lo.ogg", "house_lo.wav"]
89-
data_fname = example_path("data")
90-
for file in filenames:
91-
path = os.path.join(data_fname, file)
92-
if os.sep == "\\":
93-
path = path.replace("\\", "\\\\")
94-
bmusfn = path.encode()
95-
96-
*_, format = file.split(".")
97-
98-
# these two "with open" blocks need to be separate, which is kinda weird
99-
with open(bmusfn, "rb") as musf:
100-
pygame.mixer.music.load(musf, format)
101-
102-
with open(bmusfn, "rb") as musf:
103-
pygame.mixer.music.queue(musf, format)
104-
105-
with open(bmusfn, "rb") as musf:
106-
pygame.mixer.music.load(musf, namehint=format)
107-
108-
with open(bmusfn, "rb") as musf:
109-
pygame.mixer.music.queue(musf, namehint=format)
110-
111-
@unittest.skipIf(platform.system() == "Linux", "fails on Linux for some reason.")
112-
def test_object_namehint_xm(self):
113-
"""TODO: fix this on Linux and merge with test_object_namehint."""
114-
filenames = [
115-
"surfonasinewave.xm",
116-
]
70+
filenames = ["house_lo.ogg", "house_lo.wav", "surfonasinewave.xm"]
11771
data_fname = example_path("data")
11872
for file in filenames:
11973
path = os.path.join(data_fname, file)

0 commit comments

Comments
 (0)