-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic tests for volume exporter.
- Loading branch information
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import os | ||
|
||
from glue.core import Data | ||
|
||
from pytest import importorskip | ||
|
||
importorskip('glue_qt') | ||
importorskip('glue_vispy_viewers') | ||
|
||
from glue_vispy_viewers.volume.volume_viewer import VispyVolumeViewer # noqa: E402 | ||
|
||
from numpy import arange, ones # noqa: E402 | ||
|
||
from .test_base import TestQtExporter # noqa: E402 | ||
|
||
|
||
class TestVolume(TestQtExporter): | ||
|
||
viewer_type = VispyVolumeViewer | ||
tool_id = 'save:plotlyvolume' | ||
|
||
def make_data(self): | ||
return Data(label='d1', | ||
x=arange(24).reshape((2, 3, 4)), | ||
y=ones((2, 3, 4)), | ||
z=arange(100, 124).reshape((2, 3, 4))) | ||
|
||
def test_default(self, tmpdir): | ||
output_path = self.export_figure(tmpdir, 'test.html') | ||
assert os.path.exists(output_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters