From b30e998e659d8e3a0d84fec1b7f2bd3cb0ac55b4 Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Mon, 31 Oct 2011 16:29:09 -0200 Subject: Fix phonon unit test when there are device aliases reported by phonon. --- tests/phonon/bug_786.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/phonon/bug_786.py b/tests/phonon/bug_786.py index b1e0070ad..217ffa722 100644 --- a/tests/phonon/bug_786.py +++ b/tests/phonon/bug_786.py @@ -7,9 +7,11 @@ class TestBug786 (unittest.TestCase): def testIt(self): app = QApplication([]) + app.setApplicationName("PySide Phonon Unit Test") devices = Phonon.BackendCapabilities.availableAudioOutputDevices() if len(devices) > 1: - self.assertNotEqual(devices[0], devices[1]) + if devices[0].index() != devices[0].index(): + self.assertNotEqual(devices[0], devices[1]) self.assertEqual(devices[0], devices[0]) effects = Phonon.BackendCapabilities.availableAudioEffects() -- cgit v1.2.3