From b9bd8437d3a31e061e7aee7f5df13abf57fa35dc Mon Sep 17 00:00:00 2001
From: Nick <nicholas.curtis@uconn.edu>
Date: Sat, 10 Feb 2018 16:41:21 -0500
Subject: [PATCH] fix caching test -- need to use a copy of the kernel such
 that we share the same tempdir

---
 test/test_c_execution.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/test_c_execution.py b/test/test_c_execution.py
index 460af0c4b..20725d691 100644
--- a/test/test_c_execution.py
+++ b/test/test_c_execution.py
@@ -257,9 +257,10 @@ def test_c_caching():
     # setup test logger to check logs
     tl = TestingLogger()
     tl.start_capture()
-    # remake kernel to clear cache
-    knl = __get_knl()
-    assert np.allclose(knl(b=np.arange(10))[1], np.arange(10))
+    # copy kernel such that we share the same executor cache
+    knl = knl.copy()
+    # but use different args, so we can't cache the result
+    assert np.allclose(knl(b=np.arange(1, 11))[1], np.arange(1, 11))
     # and get logs
     logs = tl.stop_capture()
     # check that we didn't recompile
-- 
GitLab