mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-17 11:22:28 +12:00
This should build with SemaphoreCI
This commit is contained in:
parent
f098e74f45
commit
7db2848474
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue