From 5da20b4cc4993288771fb0e3646ad61e3d704edd Mon Sep 17 00:00:00 2001
From: "Mads M. Pedersen" <mmpe@dtu.dk>
Date: Thu, 2 Nov 2017 09:45:26 +0100
Subject: [PATCH] fixed caching test

---
 wetb/utils/caching.py            | 2 +-
 wetb/utils/tests/test_caching.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/wetb/utils/caching.py b/wetb/utils/caching.py
index df0c369..b4fd848 100644
--- a/wetb/utils/caching.py
+++ b/wetb/utils/caching.py
@@ -130,7 +130,7 @@ def cache_npsave(f):
 
 def _get_npsavez_wrap(f, compress):
     def wrap(filename,*args,**kwargs):
-        np_filename = os.path.splitext(filename)[0] + ".npy.npz"+("","c")[compress]
+        np_filename = os.path.splitext(filename)[0] + ".npy%s.npz"%("",".c")[compress]
         def loadsave():
             res = f(filename,*args,**kwargs)
             if compress:
diff --git a/wetb/utils/tests/test_caching.py b/wetb/utils/tests/test_caching.py
index 816d3ec..483eaa1 100644
--- a/wetb/utils/tests/test_caching.py
+++ b/wetb/utils/tests/test_caching.py
@@ -150,7 +150,7 @@ class TestCacheProperty(unittest.TestCase):
         os.remove(npfilename)
         
     def test_cache_savez_compressed(self):
-        npfilename = tfp+"test.npy.npzc"
+        npfilename = tfp+"test.npy.c.npz"
         func = open_csv3
         if os.path.isfile(npfilename):
             os.remove(npfilename)
-- 
GitLab