From bb1c1d6aad210f36baa62b6f2be8520b0dd3bbef Mon Sep 17 00:00:00 2001
From: Felipe Delestro Matos <fima@pop-os.localdomain>
Date: Fri, 10 Nov 2023 10:36:56 +0100
Subject: [PATCH] hotfix for save tests

---
 qim3d/tests/io/test_save.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/qim3d/tests/io/test_save.py b/qim3d/tests/io/test_save.py
index 87e4a6b2..fa5c2d22 100644
--- a/qim3d/tests/io/test_save.py
+++ b/qim3d/tests/io/test_save.py
@@ -145,8 +145,7 @@ def test_folder_doesnt_exist():
     invalid_path = os.path.join('this','path','doesnt','exist.tif')
 
     #message = f'The directory {re.escape(os.path.dirname(invalid_path))} does not exist. Please provide a valid directory'
-    message = f"""The directory {re.escape(os.path.dirname(invalid_path))} does not exist. Please provide a valid directory or specify a basename
- if you want to save a tiff stack as several files to a folder that does not yet exist"""
+    message = f"""The directory '{re.escape(os.path.dirname(invalid_path))}' does not exist.\nPlease provide a valid directory or specify a basename if you want to save a tiff stack as several files to a folder that does not yet exist"""
 
     with pytest.raises(ValueError,match=message):
         # Try to save test image to an invalid path
@@ -172,8 +171,7 @@ def test_no_basename():
 
     # Create temporary directory
     with tempfile.TemporaryDirectory() as temp_dir:
-        message = f"""Please provide a basename with the keyword argument 'basename' if you want to save
- a TIFF stack as several files to '{re.escape(temp_dir)}'. Otherwise, please provide a path with a valid filename"""
+        message = f"""To save a stack as several TIFF files to the directory '{re.escape(temp_dir)}', please provide the keyword argument 'basename'. Otherwise, to save a single file, please provide a full path with a filename and valid extension."""
 
         with pytest.raises(ValueError,match=message):
             # Try to save test image to an existing directory (indicating
-- 
GitLab