From 15754aaf6c433b22d69f3b48ab5eacee12abe46a Mon Sep 17 00:00:00 2001
From: Moritz Huebner <email@moritz-huebner.de>
Date: Mon, 26 Apr 2021 16:15:18 +1000
Subject: [PATCH] fixed and simplified tests

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

diff --git a/test/core/result_test.py b/test/core/result_test.py
index ad46c8b81..ebfdccdd7 100644
--- a/test/core/result_test.py
+++ b/test/core/result_test.py
@@ -230,15 +230,14 @@ class TestResult(unittest.TestCase):
     def test_save_and_dont_overwrite(self):
         extensions = ['json', 'pkl', 'hdf5']
         for extension in extensions:
-            shutil.rmtree(f"{self.result.outdir}/{self.result.label}_result.{extension}.old", ignore_errors=True)
-            self.result.save_to_file(overwrite=False)
-            self.result.save_to_file(overwrite=False)
+            print(extension)
+            self.result.save_to_file(overwrite=False, extension=extension)
+            self.result.save_to_file(overwrite=False, extension=extension)
             self.assertTrue(os.path.isfile(f"{self.result.outdir}/{self.result.label}_result.{extension}.old"))
 
     def test_save_and_overwrite_default(self):
         extensions = ['json', 'pkl', 'hdf5']
         for extension in extensions:
-            shutil.rmtree(f"{self.result.outdir}/{self.result.label}_result.{extension}.old", ignore_errors=True)
             self.result.save_to_file(overwrite=True, extension=extension)
             self.result.save_to_file(overwrite=True, extension=extension)
             self.assertFalse(os.path.isfile(f"{self.result.outdir}/{self.result.label}_result.{extension}.old"))
-- 
GitLab