mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-14 08:54:34 +12:00
This should build with SemaphoreCI
This commit is contained in:
parent
f098e74f45
commit
7db2848474
|
@ -5,12 +5,17 @@
|
||||||
|
|
||||||
import pytest
|
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
|
# We need a qApplication to be running, or all the calls to qApp
|
||||||
# will throw a seg fault.
|
# will throw a seg fault.
|
||||||
# from PyQt5.QtWidgets import QApplication
|
from PyQt5.QtWidgets import QApplication
|
||||||
# app = QApplication([])
|
app = QApplication([])
|
||||||
# app.setOrganizationName("manuskript_tests")
|
app.setOrganizationName("manuskript_tests")
|
||||||
# app.setApplicationName("manuskript_tests")
|
app.setApplicationName("manuskript_tests")
|
||||||
|
|
||||||
from manuskript import main
|
from manuskript.mainWindow import MainWindow
|
||||||
app, MW = main.prepare()
|
MW = MainWindow()
|
||||||
|
|
|
@ -5,22 +5,7 @@
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
# @pytest.fixture(scope='session', autouse=True)
|
@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
|
|
||||||
def MWEmptyProject():
|
def MWEmptyProject():
|
||||||
"""
|
"""
|
||||||
Sets the mainWindow to load an empty project.
|
Sets the mainWindow to load an empty project.
|
||||||
|
@ -34,3 +19,7 @@ def MWEmptyProject():
|
||||||
assert MW.currentProject is not None
|
assert MW.currentProject is not None
|
||||||
|
|
||||||
return MW
|
return MW
|
||||||
|
|
||||||
|
# yield MW
|
||||||
|
# # Properly destructed after. Otherwise: seg fault.
|
||||||
|
# MW.deleteLater()
|
||||||
|
|
Loading…
Reference in a new issue