From a4315251ca8582a725ff1e86c1875d4155e6f01e Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Sun, 26 Jan 2014 23:30:12 +0100 Subject: [PATCH] audio: Slight test refactor to not hide what is going on --- tests/audio/test_actor.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/audio/test_actor.py b/tests/audio/test_actor.py index b0ee4429..598ff3d1 100644 --- a/tests/audio/test_actor.py +++ b/tests/audio/test_actor.py @@ -35,25 +35,25 @@ class AudioTest(unittest.TestCase): def tearDown(self): pykka.ActorRegistry.stop_all() - def prepare_uri(self, uri): - self.audio.prepare_change() - self.audio.set_uri(uri) - def test_start_playback_existing_file(self): - self.prepare_uri(self.song_uri) + self.audio.prepare_change() + self.audio.set_uri(self.song_uri) self.assertTrue(self.audio.start_playback().get()) def test_start_playback_non_existing_file(self): - self.prepare_uri(self.song_uri + 'bogus') + self.audio.prepare_change() + self.audio.set_uri(self.song_uri + 'bogus') self.assertFalse(self.audio.start_playback().get()) def test_pause_playback_while_playing(self): - self.prepare_uri(self.song_uri) + self.audio.prepare_change() + self.audio.set_uri(self.song_uri) self.audio.start_playback() self.assertTrue(self.audio.pause_playback().get()) def test_stop_playback_while_playing(self): - self.prepare_uri(self.song_uri) + self.audio.prepare_change() + self.audio.set_uri(self.song_uri) self.audio.start_playback() self.assertTrue(self.audio.stop_playback().get())