manuskript/manuskript/tests/conftest.py
2017-11-19 00:54:11 +01:00

22 lines
449 B
Python

#!/usr/bin/env python
# --!-- coding: utf8 --!--
"""Fixtures."""
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()