Skip to content

Commit c23874f

Browse files
authored
Unit tests (#297)
* added unit tests #1 * moar tests * add more tests * fixes after PR review
1 parent 692bf6a commit c23874f

25 files changed

Lines changed: 2746 additions & 0 deletions

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ dependencies = [
3939
]
4040

4141
[project.optional-dependencies]
42+
test = [
43+
'pytest',
44+
'pytest-cov',
45+
]
46+
4247
ci = [
4348
'pyinstaller',
4449
'licensename',

tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Test package for EasyReflectometryApp backend unit tests.

tests/conftest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import pytest
2+
from PySide6.QtCore import QCoreApplication
3+
4+
5+
@pytest.fixture(scope='session')
6+
def qcore_application():
7+
app = QCoreApplication.instance()
8+
if app is None:
9+
app = QCoreApplication([])
10+
yield app
11+
app.quit()

0 commit comments

Comments
 (0)