A test for playSound(): raises an exception if there is no plugin

This commit is contained in:
Dmitri Bogomolov 2021-02-20 19:15:34 +02:00
parent c374b41639
commit 3291e97459
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -34,7 +34,7 @@ class TestBase(unittest.TestCase):
self.fail('Exception in the main thread: %s' % exc) self.fail('Exception in the main thread: %s' % exc)
class TestMain(unittest.TestCase): class TestMain(TestBase):
"""Test case for main window - basic features""" """Test case for main window - basic features"""
def test_translate(self): def test_translate(self):
@ -44,6 +44,11 @@ class TestMain(unittest.TestCase):
QtCore.QString QtCore.QString
) )
@unittest.skipIf(bitmessageqt.get_plugins, 'skip plugin absence test')
def test_sound(self):
"""Check if playing sound raises an exception if there is no plugin"""
self.window.playSound(bitmessageqt.sound.SOUND_CONNECTED, None)
class TestUISignaler(TestBase): class TestUISignaler(TestBase):
"""Test case for UISignalQueue""" """Test case for UISignalQueue"""