From 755d0a5a5fa1a4e11564b495e159acf7b6dd474b Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Thu, 4 Oct 2018 12:43:32 -0500 Subject: [PATCH] Adding vtk install to tests. --- tests/regression_tests/plot/test.py | 8 ++++++-- tools/ci/travis-install.sh | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/regression_tests/plot/test.py b/tests/regression_tests/plot/test.py index 2fec279d2..e568fe86a 100644 --- a/tests/regression_tests/plot/test.py +++ b/tests/regression_tests/plot/test.py @@ -53,8 +53,12 @@ class PlotTestHarness(TestHarness): outstr = sha512.hexdigest() # test the voxel to vtk conversion script - call(['../../../scripts/openmc-voxel-to-vtk'] + - glob.glob('plot_4.h5')) + try: + import vtk + call(['../../../scripts/openmc-voxel-to-vtk'] + + glob.glob('plot_4.h5')) + except: + pass return outstr diff --git a/tools/ci/travis-install.sh b/tools/ci/travis-install.sh index c10c22279..db8d1ca5a 100755 --- a/tools/ci/travis-install.sh +++ b/tools/ci/travis-install.sh @@ -26,5 +26,10 @@ python tools/ci/travis-install.py # Install Python API in editable mode pip install -e .[test] +a=$(dpkg --compare-versions $(python --version | cut -d" " -f 2) lt 3.7.0) +if [ $a -eq 0 ]; then + pip install -e .[vtk] +fi + # For uploading to coveralls pip install coveralls