mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-14 08:54:34 +12:00
26 lines
563 B
Python
26 lines
563 B
Python
#!/usr/bin/env python
|
|
# --!-- coding: utf8 --!--
|
|
|
|
"""Fixtures."""
|
|
|
|
import pytest
|
|
|
|
@pytest.fixture(scope='session', autouse=True)
|
|
def MWEmptyProject():
|
|
"""
|
|
Sets the mainWindow to load an empty project.
|
|
"""
|
|
from manuskript.functions import mainWindow
|
|
MW = mainWindow()
|
|
|
|
import tempfile
|
|
tf = tempfile.NamedTemporaryFile(suffix=".msk")
|
|
MW.welcome.createFile(tf.name, overwrite=True)
|
|
assert MW.currentProject is not None
|
|
|
|
return MW
|
|
|
|
# yield MW
|
|
# # Properly destructed after. Otherwise: seg fault.
|
|
# MW.deleteLater()
|