forked from pyvista/pyvista
-
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
9c6b429
commit da4ca2d
Showing
5 changed files
with
50 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
sudo: false | ||
language: python | ||
python: | ||
- "2.7" | ||
- "3.5" | ||
- "3.6" | ||
- "3.7" | ||
|
||
# install dependencies | ||
install: | ||
- pip install -r requirements.txt | ||
|
||
# run tests | ||
script: | ||
- python -m pytest |
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,3 @@ | ||
numpy | ||
imageio | ||
vtk |
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,15 @@ | ||
import vtkInterface as vtki | ||
from vtkInterface import examples | ||
|
||
def RunningXServer(): | ||
""" Check if x server is running """ | ||
if os.name != 'posix': # linux or mac os | ||
raise Exception('Can only check x server on POSIX') | ||
p = Popen(["xset", "-q"], stdout=PIPE, stderr=PIPE) | ||
p.communicate() | ||
return p.returncode == 0 | ||
|
||
# we're getting there | ||
# def test_offscreen(): | ||
# sphere = examples.LoadSphere() | ||
# sphere.Plot(off_screen=True) |
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,16 @@ | ||
import numpy as np | ||
import vtkInterface as vtki | ||
from vtkInterface import examples | ||
spherefile = examples.spherefile | ||
|
||
class TestPolyData(object): | ||
# sphere = vtki.PolyData(spherefile) | ||
|
||
def test_loadfromfile(self): | ||
sphere = vtki.PolyData(spherefile) | ||
assert sphere.GetNumberOfPoints() | ||
assert sphere.GetNumberOfCells() | ||
assert hasattr(sphere, 'points') | ||
|
||
# self = TestPolyData() | ||
# self.test_loadfromfile() |
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