Skip to content

Commit ff166fe

Browse files
authored
Merge pull request #2641 from pygame-community/ankith26-mp3-obj-test
Add mp3 file-like object tests
2 parents ea33a4f + e1f22a8 commit ff166fe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/mixer_music_test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ def music_load(self, filename):
5555
def test_load_object(self):
5656
"""test loading music from file-like objects."""
5757
filenames = ["house_lo.ogg", "house_lo.wav", "surfonasinewave.xm"]
58+
if pygame.mixer.get_sdl_mixer_version() >= (2, 6, 0):
59+
filenames.append("house_lo.mp3")
60+
5861
data_fname = example_path("data")
5962
for file in filenames:
6063
path = os.path.join(data_fname, file)
@@ -68,6 +71,9 @@ def test_load_object(self):
6871
def test_object_namehint(self):
6972
"""test loading & queuing music from file-like objects with namehint argument."""
7073
filenames = ["house_lo.ogg", "house_lo.wav", "surfonasinewave.xm"]
74+
if pygame.mixer.get_sdl_mixer_version() >= (2, 6, 0):
75+
filenames.append("house_lo.mp3")
76+
7177
data_fname = example_path("data")
7278
for file in filenames:
7379
path = os.path.join(data_fname, file)

0 commit comments

Comments
 (0)