Skip to content

Commit

Permalink
Catch exception during test discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
thangleiter committed Jul 3, 2020
1 parent 1bb09ae commit b65d79d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_extras.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ def test_plotting_not_available(self):
reason='Skipping tests for missing bloch sphere visualization tests in build with qutip') # noqa
def test_bloch_sphere_visualization_not_available(self):

from filter_functions import plotting
try:
from filter_functions import plotting
except ModuleNotFoundError:
plotting = None

with self.assertRaises(RuntimeError):
plotting.get_bloch_vector(testutil.rng.standard_normal((10, 2)))
Expand Down

0 comments on commit b65d79d

Please sign in to comment.