Skip to content

Commit

Permalink
Merge pull request #196 from astrofrog/fix-ci
Browse files Browse the repository at this point in the history
Fix CI issues
  • Loading branch information
astrofrog committed Apr 8, 2019
2 parents ea2d404 + 8efd486 commit bea8b0c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
7 changes: 7 additions & 0 deletions pywwt/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ def wwt_qt_client():
return wwt


@pytest.fixture(scope='function')
def wwt_qt_client_isolated():
from .qt import WWTQtClient
wwt = WWTQtClient(block_until_ready=True, size=(400, 400))
return wwt


@pytest.fixture(autouse=True)
def reset_state(wwt_qt_client):
wwt_qt_client.reset()
Expand Down
18 changes: 14 additions & 4 deletions pywwt/tests/test_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,17 @@ def test_layers_image(tmpdir, wwt_qt_client):
assert_widget_image(tmpdir, wwt, 'sky_layers.png')


def test_image_layer_equ(tmpdir, wwt_qt_client):
def test_image_layer_equ(tmpdir, wwt_qt_client_isolated):

# A series of tests that excercise the image layer functionality and compare
# the results with a set of baseline images.

wwt = wwt_qt_client
# NOTE: due to an unknown issue, we need to run this using an isolated
# Qt client and we can't re-use the usual wwt_qt_client fixture, as loading
# the image layer appears to have some kind of irreversible impact on the
# state of the Qt widget.

wwt = wwt_qt_client_isolated

wwt.foreground = 'Black Sky Background'
wwt.background = 'Black Sky Background'
Expand All @@ -341,12 +346,17 @@ def test_image_layer_equ(tmpdir, wwt_qt_client):
assert_widget_image(tmpdir, wwt, 'image_layer_equ.png')


def test_image_layer_gal(tmpdir, wwt_qt_client):
def test_image_layer_gal(tmpdir, wwt_qt_client_isolated):

# A series of tests that excercise the image layer functionality and compare
# the results with a set of baseline images.

wwt = wwt_qt_client
# NOTE: due to an unknown issue, we need to run this using an isolated
# Qt client and we can't re-use the usual wwt_qt_client fixture, as loading
# the image layer appears to have some kind of irreversible impact on the
# state of the Qt widget.

wwt = wwt_qt_client_isolated

wwt.foreground = 'Black Sky Background'
wwt.background = 'Black Sky Background'
Expand Down

0 comments on commit bea8b0c

Please sign in to comment.