Commit ae4726a0 authored by Thomas Dowrick's avatar Thomas Dowrick
Browse files

Move qtbot to individual tests

parent 50a62416
Pipeline #1424 failed with stage
in 9 minutes and 19 seconds
......@@ -4,59 +4,7 @@ variables:
PYPI_PASS: SECURE
stages:
- build
- installer
- test
- deploy
build docs:
stage: build
script:
- tox -e docs
tags:
- shared-linux
artifacts:
paths:
- doc/
expire_in: 1 week
build linux installer:
stage: build
script:
- tox -e installer
tags:
- shared-linux
artifacts:
paths:
- dist/
expire_in: 1 week
build mac installer:
stage: build
script:
- tox -e installer
tags:
- shared-mac
artifacts:
paths:
- dist/
expire_in: 1 week
build windows installer:
stage: build
script:
- tox -e installer
tags:
- shared-win, gui
artifacts:
paths:
- dist/
expire_in: 1 week
test Linux:
stage: test
variables:
......@@ -84,64 +32,3 @@ test Windows:
- tox
tags:
- shared-win
deploy docs to staging:
stage: deploy
script:
# Note: the group/username directory must already exist on the server before calling this command
- rsync -avz -e'ssh -v' --numeric-ids --delete doc/build/html/* staging_docs_rsync:WEISS/SoftwareRepositories/SNAPPY/scikit-surgeryARDavinci 2>&1
tags:
- docs-staging
environment:
name: staging
url: http://weisslab-lin.cs.ucl.ac.uk/staging/WEISS/SoftwareRepositories/SNAPPY/scikit-surgeryARDavinci
only:
- master
dependencies:
- build docs
deploy docs to production:
stage: deploy
script:
# Note: the group/username directory must already exist on the server before calling this command
- rsync -avz -e'ssh -v' --numeric-ids --delete doc/build/html/* production_docs_rsync:WEISS/SoftwareRepositories/SNAPPY/scikit-surgeryARDavinci 2>&1
tags:
- docs-production
environment:
name: production
only:
- public
dependencies:
- build docs
deploy pip to PyPI:
stage: deploy
when: manual
only:
- tags
environment:
name: PyPI
url: https://pypi.python.org/pypi/scikit-surgeryARDavinci
tags:
- pip-production
artifacts:
paths:
- dist/
script:
# Install packages required to build/publish
# remove any previous distribution files
- pip install wheel twine setuptools
- rm -rf dist
# bundle installer
- python setup.py bdist_wheel
# Upload to pypi
- twine upload --repository pypi dist/* --username $PYPI_USER --password $PYPI_PASS
......@@ -16,7 +16,16 @@ def mono_viewer(qtbot):
return mono_viewer
def test_opacity_slider_for_correct_opacity(mono_viewer):
def test_opacity_slider_for_correct_opacity(qtbot):
mono_viewer = Viewers.MonoViewer('tests/data/test_video.avi')
qtbot.addWidget(mono_viewer)
vtk_model_path = 'inputs/Liver'
vtk_model_loader = VTKSurfaceModelDirectoryLoader(vtk_model_path)
mono_viewer.add_VTK_models(vtk_model_loader.models)
mono_viewer.start()
mono_viewer.UI.opacity_slider.setSliderPosition(50)
for vtk_model in mono_viewer.UI.vtk_models:
assert vtk_model.actor.GetProperty().GetOpacity() == 0.5
......@@ -30,7 +39,15 @@ def test_opacity_slider_for_correct_opacity(mono_viewer):
assert vtk_model.actor.GetProperty().GetOpacity() == 1
def test_opacity_slider_for_incorrect_opacity(mono_viewer):
def test_opacity_slider_for_incorrect_opacity(qtbot):
mono_viewer = Viewers.MonoViewer('tests/data/test_video.avi')
qtbot.addWidget(mono_viewer)
vtk_model_path = 'inputs/Liver'
vtk_model_loader = VTKSurfaceModelDirectoryLoader(vtk_model_path)
mono_viewer.add_VTK_models(vtk_model_loader.models)
mono_viewer.start()
mono_viewer.UI.opacity_slider.setSliderPosition(0)
for vtk_model in mono_viewer.UI.vtk_models:
assert vtk_model.actor.GetProperty().GetOpacity() != 0.5
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment