forked from openlp/openlp
Fixed and verified test on Ubuntu/Impress
This commit is contained in:
parent
f2a2468e01
commit
d4d572bf80
@ -249,7 +249,10 @@ class ImpressDocument(PresentationDocument):
|
||||
window = self.document.getCurrentController().getFrame().getContainerWindow()
|
||||
window.setVisible(False)
|
||||
self.presentation = self.document.getPresentation()
|
||||
self.presentation.Display = ScreenList().current['number'] + 1
|
||||
try:
|
||||
self.presentation.Display = ScreenList().current['number'] + 1
|
||||
except:
|
||||
log.debug('Unable to load the current display')
|
||||
self.control = None
|
||||
self.create_thumbnails()
|
||||
self.create_titles_and_notes()
|
||||
|
@ -56,11 +56,11 @@ class TestLibModule(TestCase):
|
||||
# WHEN: We "convert" it to a bool
|
||||
isInstalled = self.ppc.check_available()
|
||||
# THEN: We should get back a True bool
|
||||
assert isInstalled is True, u'The result should be True'
|
||||
assert isInstalled is True, 'The result should be True'
|
||||
|
||||
# add _test to the following if necessary
|
||||
# I don't have Impress to verify
|
||||
def verify_loading_document(self):
|
||||
def verify_loading_document_test(self):
|
||||
"""
|
||||
Test loading a document
|
||||
"""
|
||||
@ -71,7 +71,7 @@ class TestLibModule(TestCase):
|
||||
self.doc.load_presentation()
|
||||
result = self.doc.is_loaded()
|
||||
# THEN: result should be true
|
||||
assert result is True, u'The result should be True'
|
||||
assert result is True, 'The result should be True'
|
||||
|
||||
def verify_titles_test(self):
|
||||
"""
|
||||
@ -80,6 +80,7 @@ class TestLibModule(TestCase):
|
||||
# GIVEN:
|
||||
self.doc = ImpressDocument(self.ppc,self.file_name)
|
||||
self.doc.load_presentation()
|
||||
#assert self.doc.is_loaded(), 'The document should have loaded'
|
||||
self.doc.create_titles_and_notes()
|
||||
#self.doc.load_presentation()
|
||||
# WHEN reading the titles and notes
|
||||
@ -87,6 +88,5 @@ class TestLibModule(TestCase):
|
||||
print("titles: ".join(titles))
|
||||
print("notes: ".join(notes))
|
||||
# THEN there should be exactly 5 titles and 5 notes
|
||||
assert len(titles)==5, u'There should be five titles'
|
||||
assert len(notes)==5, u'Theres should be five notes'
|
||||
|
||||
assert len(titles)==5, 'There should be five titles'
|
||||
assert len(notes)==5, 'Theres should be five notes'
|
Loading…
Reference in New Issue
Block a user