Skip to content

Commit

Permalink
"Add xm and opus to tested formats
Browse files Browse the repository at this point in the history
Co-authored-by: Bilhox <lodyvanwilderman@gmail.com>"
  • Loading branch information
Borishkof committed Nov 29, 2024
1 parent 4bfd1e8 commit 446c2f1
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions test/mixer_test.py
Original file line number Diff line number Diff line change
@@ -714,7 +714,13 @@ def test_get_sdl_mixer_version__linked_equals_compiled(self):
def test_snd_copy(self):
mixer.init()

filenames = ["house_lo.ogg", "house_lo.wav", "house_lo.flac"]
filenames = [
"house_lo.ogg",
"house_lo.wav",
"house_lo.flac",
"house_lo.opus",
"surfonasinewave.xm",
]
if pygame.mixer.get_sdl_mixer_version() >= (2, 6, 0):
filenames.append("house_lo.mp3")

@@ -727,14 +733,18 @@ def test_snd_copy(self):
self.assertEqual(sound.get_volume(), sound_copy.get_volume())
self.assertEqual(sound.get_raw(), sound_copy.get_raw())

sound.set_volume(0.5)
self.assertNotEqual(sound.get_volume(), sound_copy.get_volume())

del sound

# Test on the copy
# Test on the copy for playable sounds
channel = sound_copy.play()
if channel is None:
continue
self.assertTrue(channel.get_busy())
sound_copy.stop()
self.assertFalse(channel.get_busy())

sound_copy.play()
self.assertEqual(sound_copy.get_num_channels(), 1)

0 comments on commit 446c2f1

Please sign in to comment.