From c14fcef26f3dfe3876e5ea9a103635121494d239 Mon Sep 17 00:00:00 2001
From: Daniel <d.hornung@indiscale.com>
Date: Tue, 30 Jul 2024 12:55:42 +0200
Subject: [PATCH] STY: Whitespaces and test.

---
 src/caosadvancedtools/table_importer.py | 2 +-
 unittests/test_table_importer.py        | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/caosadvancedtools/table_importer.py b/src/caosadvancedtools/table_importer.py
index 72a51c0f..cd1b206f 100755
--- a/src/caosadvancedtools/table_importer.py
+++ b/src/caosadvancedtools/table_importer.py
@@ -574,7 +574,7 @@ class CSVImporter(TableImporter):
             for ii, error_list in error_dict.items():
                 msg += f"* row {ii}:\n"
                 for err in error_list:
-                    msg += f"\t* column \"{err[0]}\": Expected \"{err[1]}\" but found \"{err[2]}\".\n"
+                    msg += f"  * column \"{err[0]}\": Expected \"{err[1]}\" but found \"{err[2]}\".\n"
                 msg += '\n'
             raise DataInconsistencyError(msg)
 
diff --git a/unittests/test_table_importer.py b/unittests/test_table_importer.py
index 768e3f0c..0abc28bb 100644
--- a/unittests/test_table_importer.py
+++ b/unittests/test_table_importer.py
@@ -408,6 +408,7 @@ class CSVImporterTest(TableImporterTest):
         with pytest.raises(DataInconsistencyError) as die:
             df = importer.read_file(tmpfile.name)
         msg = str(die.value)
+        print("\n" + msg)
         assert "Elements with wrong datatypes encountered:\n" in msg
         # Errors in rows 1 and 3, no errors in 2 and 4
         assert "* row 1:\n" in msg
@@ -418,9 +419,9 @@ class CSVImporterTest(TableImporterTest):
         # exactly 2 errors in row 1, exactly 1 in row 3
         assert len(row_1_msgs.strip().split('\n')) == 2
         assert len(row_3_msgs.strip().split('\n')) == 1
-        assert "\t* column \"int\"" in row_1_msgs
-        assert "\t* column \"float\"" in row_1_msgs
-        assert "\t* column \"float\"" in row_3_msgs
+        assert "  * column \"int\"" in row_1_msgs
+        assert "  * column \"float\"" in row_1_msgs
+        assert "  * column \"float\"" in row_3_msgs
 
 
 class TSVImporterTest(TableImporterTest):
-- 
GitLab