The GUI test now run on a local virtualbox, testing on Travis
This commit is contained in:
+6
-6
@@ -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
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
[pytest]
|
||||
markers =
|
||||
project: Project classes tests
|
||||
core: Core functionality tests
|
||||
gui: Qt5 GUI tests
|
||||
serial
|
||||
+4
-4
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user