This should build with SemaphoreCI

This commit is contained in:
Olivier Keshavjee 2017-11-19 17:54:04 +01:00
parent f098e74f45
commit 7db2848474
2 changed files with 16 additions and 22 deletions

View file

@ -5,12 +5,17 @@
import pytest
## Don't know why, this causes seg fault on SemaphoreCI
## Seg fault in app = QApplication(...)
# from manuskript import main
# app, MW = main.prepare()
# We need a qApplication to be running, or all the calls to qApp
# will throw a seg fault.
# from PyQt5.QtWidgets import QApplication
# app = QApplication([])
# app.setOrganizationName("manuskript_tests")
# app.setApplicationName("manuskript_tests")
from PyQt5.QtWidgets import QApplication
app = QApplication([])
app.setOrganizationName("manuskript_tests")
app.setApplicationName("manuskript_tests")
from manuskript import main
app, MW = main.prepare()
from manuskript.mainWindow import MainWindow
MW = MainWindow()

View file

@ -5,22 +5,7 @@
import pytest
# @pytest.fixture(scope='session', autouse=True)
# def MW():
# """
# Creates a mainWindow that can be used for the tests
# Either with functions.mainWindow or by passing argument
# MW to the test
# """
# from manuskript.mainWindow import MainWindow
# mw = MainWindow()
#
# yield
#
# # Properly destructed after. Otherwise: seg fault.
# mw.deleteLater()
@pytest.fixture
@pytest.fixture(scope='session', autouse=True)
def MWEmptyProject():
"""
Sets the mainWindow to load an empty project.
@ -34,3 +19,7 @@ def MWEmptyProject():
assert MW.currentProject is not None
return MW
# yield MW
# # Properly destructed after. Otherwise: seg fault.
# MW.deleteLater()