This commit is contained in:
Tim Bentley 2017-12-18 17:10:04 +00:00
parent c2215d1a1e
commit 054e6e08b0
4 changed files with 5 additions and 5 deletions

View File

@ -42,4 +42,4 @@ class TestValidationError(TestCase):
# THEN: Then calling str on the error should return the correct text and it should be an instance of `Exception`
assert str(error) == 'Test ValidationError'
assert isinstance(error, Exception) is True
assert isinstance(error, Exception)

View File

@ -98,7 +98,7 @@ class TestImageManager(TestCase, TestMixin):
image = self.image_manager.get_image(full_path, 'church.jpg', 80, 80)
# THEN: The return should be of type image
assert isinstance(image, QtGui.QImage) is True, 'The returned object should be a QImage'
assert isinstance(image, QtGui.QImage), 'The returned object should be a QImage'
# WHEN: adding the same image with different dimensions
self.image_manager.add_image(full_path, 'church.jpg', None, 100, 100)

View File

@ -293,7 +293,7 @@ class TestLib(TestCase):
# THEN: Check if the thumb was created and scaled to the given size.
self.assertTrue(thumb_path.exists(), 'Test was not ran, because the thumb already exists')
assert isinstance(icon, QtGui.QIcon), 'The icon should be a QIcon'
assert icon.isNull()is False, 'The icon should not be null'
assert icon.isNull() is False, 'The icon should not be null'
assert thumb_size == QtGui.QImageReader(str(thumb_path)).size(), 'The thumb should have the given size'
# Remove the thumb so that the test actually tests if the thumb will be created.

View File

@ -113,7 +113,7 @@ class TestServiceItem(TestCase, TestMixin):
service_item.set_from_service(line)
# THEN: We should get back a valid service item
assert service_item.is_valid, 'The new service item should be valid'
assert service_item.is_valid is True, 'The new service item should be valid'
assert_length(0, service_item._display_frames, 'The service item should have no display frames')
assert_length(5, service_item.capabilities, 'There should be 5 default custom item capabilities')
@ -334,7 +334,7 @@ class TestServiceItem(TestCase, TestMixin):
service_item.set_from_service(line, '/test/')
# THEN: We should get back a valid service item
assert service_item.is_valid, 'The new service item should be valid'
assert service_item.is_valid is True, 'The new service item should be valid'
assert 0 == len(service_item._display_frames), 'The service item should have no display frames'
assert 7 == len(service_item.capabilities), 'There should be 7 default custom item capabilities'