diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2010-04-30 20:12:29 -0300 |
---|---|---|
committer | Lauro Neto <lauro.neto@openbossa.org> | 2010-05-03 17:41:26 -0300 |
commit | 6d2bdf8907edfcef88cd38530778a9e3500f0886 (patch) | |
tree | 499d4f9d9197812111fc7d1d268d697e27aada7e | |
parent | 8ba349cfedc492dc0260cf176a2f7ca86e06b186 (diff) |
Fix phonon playing test
Wasn't playing anything as no output was being connected to
the source.
-rwxr-xr-x[-rw-r--r--] | tests/phonon/basic_playing_test.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/phonon/basic_playing_test.py b/tests/phonon/basic_playing_test.py index 100a036c0..fe295e898 100644..100755 --- a/tests/phonon/basic_playing_test.py +++ b/tests/phonon/basic_playing_test.py @@ -25,8 +25,17 @@ class TestSimplePlaying(UsesQCoreApplication): self.called = False + # prevent locking with: + # request to play a stream, but no valid audio ... + self.output = phonon.Phonon.AudioOutput() + self.path = phonon.Phonon.createPath(self.media, self.output) + def tearDown(self): super(TestSimplePlaying, self).tearDown() + del self.path + del self.output + del self.media + del self.source def testFinishedSignal(self): # Should pass if finished() is called @@ -37,12 +46,9 @@ class TestSimplePlaying(UsesQCoreApplication): self.assertEqual(self.media.currentSource(), self.source) def testPathCreation(self): - output = phonon.Phonon.AudioOutput() - path = phonon.Phonon.createPath(self.media, output) - # FIXME Both functions below are not exported by PyQt4 - self.assertEqual(path.sink(), output) - self.assertEqual(path.source(), self.media) + self.assertEqual(self.path.sink(), self.output) + self.assertEqual(self.path.source(), self.media) def state_cb(self, newState, OldState): self.called = True |