forked from enthought/mayavi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c75bb7d
commit 06ea7a5
Showing
2 changed files
with
32 additions
and
26 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,23 @@ | ||
import unittest | ||
from unittest.mock import patch | ||
import os | ||
|
||
from mayavi import mlab | ||
from .test_engine_manager import patch_backend | ||
|
||
|
||
def patch_pyface(): | ||
return patch("mayavi.core.common.pyface", None) | ||
|
||
|
||
class TestFilters(unittest.TestCase): | ||
@patch_pyface() | ||
@patch_backend('test') | ||
def test_cell_to_point_data(self): | ||
src = mlab.pipeline.open(os.path.join('data', 'pyramid_ug.vtu')) | ||
cd = mlab.pipeline.cell_derivatives(src) | ||
cd.filter.vector_mode = 'compute_vorticity' | ||
c2p = mlab.pipeline.cell_to_point_data(cd) | ||
st = mlab.pipeline.streamline(c2p) | ||
st.update_pipeline() | ||
mlab.clf() |