The GUI test now run on a local virtualbox, testing on Travis

This commit is contained in:
Veronica K. B. Olsen
2019-05-17 10:13:57 +02:00
parent c13e140e37
commit 1c35b54a3d
3 changed files with 16 additions and 10 deletions
+6 -6
View File
@@ -1,6 +1,6 @@
dist: xenial
# services:
# - xvfb
services:
- xvfb
language: python
sudo: required
addons:
@@ -11,12 +11,12 @@ python:
- "3.7"
install:
- pip install -r requirements.txt
# - pip install pytest-faulthandler
- pip install pytest-faulthandler
- pip install pytest-cov
# - pip install pytest-qt
- pip install pytest-qt
- pip install codecov
script:
# - xvfb-run -a python -m pytest --cov=nw -m "project|core|gui" -v -s
- python -m pytest --cov=nw -m "project|core" -v
- xvfb-run -a python -m pytest --cov=nw -m "project|core|gui" -v -s
# - python -m pytest --cov=nw -m "project|core" -v
after_success:
- codecov
+6
View File
@@ -0,0 +1,6 @@
[pytest]
markers =
project: Project classes tests
core: Core functionality tests
gui: Qt5 GUI tests
serial
+4 -4
View File
@@ -14,8 +14,8 @@ testRef = path.join(testDir,"reference")
@pytest.mark.gui
def testMainWindows(qtbot, tmpdir):
confDir = tmpdir.mkdir("conf")
projDir = tmpdir.mkdir("project")
confDir = str(tmpdir.mkdir("conf"))
projDir = str(tmpdir.mkdir("project"))
nwGUI = nw.main(["--testmode","--config=%s" % confDir])
qtbot.addWidget(nwGUI)
nwGUI.show()
@@ -103,9 +103,9 @@ def testMainWindows(qtbot, tmpdir):
qtbot.wait(stepDelay)
# Check the files
projFile = projDir.join("nwProject.nwx")
projFile = str(projDir.join("nwProject.nwx"))
assert cmpFiles(projFile, path.join(testRef,"gui_nwProject.nwx"), [2])
sceneFile = projDir.join("data_3","1489056e0916_main.nwd")
sceneFile = str(projDir.join("data_3","1489056e0916_main.nwd"))
assert cmpFiles(sceneFile, path.join(testRef,"gui_1489056e0916_main.nwd"))
# qtbot.stopForInteraction()