forked from openlp/openlp
Cleanup
This commit is contained in:
parent
bc5334fa1a
commit
89856e0e9a
@ -6,12 +6,12 @@ import os
|
|||||||
|
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
from mock import MagicMock
|
|
||||||
from openlp.core.lib import Registry, ImageManager, ScreenList
|
from openlp.core.lib import Registry, ImageManager, ScreenList
|
||||||
from PyQt4 import QtCore, QtGui, QtTest
|
from PyQt4 import QtGui
|
||||||
|
|
||||||
TEST_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), u'..', u'..', u'resources'))
|
TEST_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), u'..', u'..', u'resources'))
|
||||||
|
|
||||||
|
|
||||||
class TestImageManager(TestCase):
|
class TestImageManager(TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
@ -46,4 +46,4 @@ class TestImageManager(TestCase):
|
|||||||
# THEN a KeyError is thrown
|
# THEN a KeyError is thrown
|
||||||
with self.assertRaises(KeyError) as context:
|
with self.assertRaises(KeyError) as context:
|
||||||
self.image_manager.get_image(TEST_PATH, u'church1.jpg')
|
self.image_manager.get_image(TEST_PATH, u'church1.jpg')
|
||||||
self.assertNotEquals(context.exception[0], u'', u'KeyError exception should have been thrown for missing image')
|
self.assertNotEquals(context.exception[0], u'', u'KeyError exception should have been thrown for missing image')
|
||||||
|
@ -5,4 +5,4 @@ sip.setapi(u'QString', 2)
|
|||||||
sip.setapi(u'QTextStream', 2)
|
sip.setapi(u'QTextStream', 2)
|
||||||
sip.setapi(u'QTime', 2)
|
sip.setapi(u'QTime', 2)
|
||||||
sip.setapi(u'QUrl', 2)
|
sip.setapi(u'QUrl', 2)
|
||||||
sip.setapi(u'QVariant', 2)
|
sip.setapi(u'QVariant', 2)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
Package to test the openlp.core.ui package.
|
Package to test the openlp.core.lib package.
|
||||||
"""
|
"""
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
@ -38,4 +38,4 @@ class TestStartNoteDialog(TestCase):
|
|||||||
# WHEN I have an empty display
|
# WHEN I have an empty display
|
||||||
# THEN the count of items should be zero
|
# THEN the count of items should be zero
|
||||||
self.assertEqual(self.service_manager.service_manager_list.topLevelItemCount(), 0,
|
self.assertEqual(self.service_manager.service_manager_list.topLevelItemCount(), 0,
|
||||||
u'There the service manager list is empty ')
|
u'There the service manager list is not empty ')
|
||||||
|
Loading…
Reference in New Issue
Block a user