From ffc2cf1134af23d150a2040d16ac77eb9b799140 Mon Sep 17 00:00:00 2001
From: George Marchment <georgemarchment@yahoo.fr>
Date: Tue, 12 Mar 2024 11:49:22 +0100
Subject: [PATCH] fix tests

---
 tests/test_code.py    | 3 +--
 tests/test_outils.py  | 2 +-
 tests/test_process.py | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/test_code.py b/tests/test_code.py
index 970f090..0dd7b5f 100644
--- a/tests/test_code.py
+++ b/tests/test_code.py
@@ -9,9 +9,8 @@ class TestCode(unittest.TestCase):
 
         with open("tests/ressources/outils/remove_comments_wo.nf", 'r') as f:
             code_wo_comments = f.read()
-
         code = Code(code_with_comments, origin=None)
         self.assertEqual(code.code, '\n'+code_with_comments+'\n')
-        self.assertEqual(code.code_wo_comments, '\n'+code_wo_comments+'\n')
+        self.assertEqual(code.code_wo_comments.strip(), code_wo_comments.strip())
         self.assertEqual(code.get_code(), code_wo_comments.strip())
     
diff --git a/tests/test_outils.py b/tests/test_outils.py
index c0cb904..2143f18 100644
--- a/tests/test_outils.py
+++ b/tests/test_outils.py
@@ -42,5 +42,5 @@ class TestOutils(unittest.TestCase):
         with open(candidate := "tests/ressources/outils/remove_comments_wo.candidate.nf", 'w') as f:
             f.write(produced)
 
-        self.assertEqual(produced, code_wo_comments)
+        self.assertEqual(produced.strip(), code_wo_comments.strip())
         os.unlink(candidate)
diff --git a/tests/test_process.py b/tests/test_process.py
index 37a242c..ff40c83 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -94,7 +94,7 @@ class TestProcess(unittest.TestCase):
         dico['edges'] = []
         dico['subworkflows'] = {}
         process_DSL2.get_structure(dico)
-        dico_true = {'nodes': [{'id': str(process_DSL2), 'name': 'OPENMS_FALSEDISCOVERYRATE', 'shape': 'ellipse', 'xlabel': ''}], 'edges': [], 'subworkflows': {}}
+        dico_true = {'nodes': [{'id': str(process_DSL2), 'name': 'OPENMS_FALSEDISCOVERYRATE', 'shape': 'ellipse', 'xlabel': '', 'fillcolor': ''}], 'edges': [], 'subworkflows': {}}
         self.assertEqual(dico,  dico_true)
 
     def test_(self):
-- 
GitLab