Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility with pytest 3.x #1116

Merged
merged 1 commit into from
Aug 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Full changelog
v0.9.0 (unreleased)
-----------------

* Fix compatibility of test suite with pytest 3.x. [#1116]

* Updated bundled version of WCSAxes to v0.9.

* Implement new widget with better control over exporting to Plotly. The
Expand Down
7 changes: 2 additions & 5 deletions glue/plugins/coordinate_helpers/tests/test_link_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@
import pytest
import numpy as np

pytest.importorskip('astropy')

from glue.core import ComponentID
from glue.core.tests.test_link_helpers import check_link, check_using
from glue.tests.helpers import ASTROPY_INSTALLED

from ..link_helpers import (Galactic_to_FK5, FK4_to_FK5, ICRS_to_FK5,
Galactic_to_FK4, ICRS_to_FK4, ICRS_to_Galactic)

if not ASTROPY_INSTALLED:
pytest.skip()


# We now store for each class the expected result of the conversion of (45,50)
# from the input frame to output frame and then from the output frame to the
# input frame.
Expand Down
7 changes: 2 additions & 5 deletions glue/plugins/exporters/plotly/qt/tests/test_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
import pytest
from mock import patch

try:
import plotly
from plotly.exceptions import PlotlyError
except ImportError:
pytest.skip()
plotly = pytest.importorskip('plotly')
from plotly.exceptions import PlotlyError

from glue.tests.helpers import requires_plotly
from glue.core import Data, DataCollection
Expand Down
5 changes: 1 addition & 4 deletions glue/plugins/exporters/plotly/tests/test_plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
from glue.config import settings
from glue.core import Data, DataCollection

from glue.tests.helpers import QT_INSTALLED

if not QT_INSTALLED:
pytest.skip()
pytest.importorskip('qtpy')

from glue.app.qt import GlueApplication
from glue.viewers.scatter.qt import ScatterWidget
Expand Down
6 changes: 2 additions & 4 deletions glue/plugins/ginga_viewer/qt/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
import numpy as np
from numpy.testing import assert_array_equal

pytest.importorskip('ginga')

from glue.core import Data
from glue.viewers.image.tests.test_client import _TestImageClientBase
from glue.tests.helpers import GINGA_INSTALLED

if not GINGA_INSTALLED:
pytest.skip()

from ginga.misc import log
from ginga.qtw.ImageViewCanvasQt import ImageViewCanvas
Expand Down
5 changes: 1 addition & 4 deletions glue/plugins/ginga_viewer/qt/tests/test_viewer_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

import pytest

from glue.tests.helpers import GINGA_INSTALLED

if not GINGA_INSTALLED:
pytest.skip()
pytest.importorskip('ginga')

from glue.viewers.image.qt.tests.test_viewer_widget import _TestImageWidgetBase

Expand Down