From d75277732b6c494215f164ddac2bbdcf27dae68a Mon Sep 17 00:00:00 2001
From: Michael Kuron <mkuron@icp.uni-stuttgart.de>
Date: Thu, 23 Jan 2020 12:01:24 +0100
Subject: [PATCH] more tests skipped if depenencies missing

---
 .../full_scenarios/shear_wave/scenario_shear_wave.py |  3 +++
 lbmpy_tests/test_html_output.py                      |  4 ++++
 lbmpy_tests/test_n_phase_boyer_noncoupled.ipynb      | 12 +++++++++++-
 3 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/lbmpy_tests/full_scenarios/shear_wave/scenario_shear_wave.py b/lbmpy_tests/full_scenarios/shear_wave/scenario_shear_wave.py
index 09af0c74..77dc02e9 100644
--- a/lbmpy_tests/full_scenarios/shear_wave/scenario_shear_wave.py
+++ b/lbmpy_tests/full_scenarios/shear_wave/scenario_shear_wave.py
@@ -7,6 +7,8 @@
 import numpy as np
 import sympy as sp
 
+import pytest
+
 from lbmpy.creationfunctions import update_with_default_parameters
 from lbmpy.relaxationrates import (
     relaxation_rate_from_lattice_viscosity, relaxation_rate_from_magic_number)
@@ -212,6 +214,7 @@ def create_full_parameter_study():
 
 
 def test_shear_wave():
+    pytest.importorskip('pycuda')
     params = {
         'l_0': 32,
         'u_0': 0.096,
diff --git a/lbmpy_tests/test_html_output.py b/lbmpy_tests/test_html_output.py
index d1a7f8df..66050072 100644
--- a/lbmpy_tests/test_html_output.py
+++ b/lbmpy_tests/test_html_output.py
@@ -1,3 +1,5 @@
+import pytest
+
 from lbmpy.creationfunctions import create_lb_method
 from lbmpy.methods.creationfunctions import compare_moment_based_lb_methods
 from lbmpy.moments import (
@@ -6,6 +8,7 @@ from lbmpy.stencils import get_stencil
 
 
 def test_moment_comparison_table():
+    pytest.importorskip('ipy_table')
     new = create_lb_method(stencil='D3Q19', maxwellian_moments=True)
     old = create_lb_method(stencil='D3Q19', maxwellian_moments=False)
 
@@ -25,6 +28,7 @@ def test_moment_comparison_table():
 
 
 def test_moment_equality_table():
+    pytest.importorskip('ipy_table')
     d3q19 = get_stencil('D3Q19')
     table1 = moment_equality_table(d3q19, max_order=3)
     assert len(table1.array) == 5
diff --git a/lbmpy_tests/test_n_phase_boyer_noncoupled.ipynb b/lbmpy_tests/test_n_phase_boyer_noncoupled.ipynb
index 328fbc9e..888e2e29 100644
--- a/lbmpy_tests/test_n_phase_boyer_noncoupled.ipynb
+++ b/lbmpy_tests/test_n_phase_boyer_noncoupled.ipynb
@@ -1,5 +1,15 @@
 {
  "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import pytest\n",
+    "pytest.importorskip('pycuda')"
+   ]
+  },
   {
    "cell_type": "code",
    "execution_count": 1,
@@ -360,7 +370,7 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.6.8"
+   "version": "3.6.9"
   }
  },
  "nbformat": 4,
-- 
GitLab