From bbceb1a11ad1f0a21bdf5b390c9bb1fefa4a48da Mon Sep 17 00:00:00 2001
From: "Timothy A. Smith" <tasmith4@illinois.edu>
Date: Mon, 27 May 2019 22:03:24 -0500
Subject: [PATCH] added file for comparison fixtures, move array comparison
 there

---
 comparison_fixtures.py | 4 ++++
 test.py                | 6 ++++--
 2 files changed, 8 insertions(+), 2 deletions(-)
 create mode 100644 comparison_fixtures.py

diff --git a/comparison_fixtures.py b/comparison_fixtures.py
new file mode 100644
index 0000000..4d2be8b
--- /dev/null
+++ b/comparison_fixtures.py
@@ -0,0 +1,4 @@
+import numpy.linalg as la
+
+def arrays(a, b):
+    assert la.norm(a - b, 2)/la.norm(b) < 1e-5
diff --git a/test.py b/test.py
index 5db0b73..198cf24 100644
--- a/test.py
+++ b/test.py
@@ -15,7 +15,7 @@ from pyopencl.tools import (  # noqa
         as pytest_generate_tests)
 
 import fixtures
-
+import comparison_fixtures as compare
 
 def test_matvec(ctx_factory):
     a = fixtures.random_array(10, 10)
@@ -23,9 +23,10 @@ def test_matvec(ctx_factory):
 
     c = fixtures.mult_mat_vec(ctx_factory, a=a, b=b, alpha=1.0)
 
-    assert la.norm(a@b - c, 2)/la.norm(c) < 1e-5
+    compare.arrays(a@b, c)
 
 
+@pytest.mark.skip("slow")
 def test_compute_flux_derivatives(ctx_factory):
     logging.basicConfig(level="INFO")
 
@@ -46,6 +47,7 @@ def test_compute_flux_derivatives(ctx_factory):
             metric_jacobians=metric_jacobians)
 
 
+@pytest.mark.skip("slow")
 def test_compute_flux_derivatives_gpu(ctx_factory):
     logging.basicConfig(level="INFO")
 
-- 
GitLab