From a537ad2c63189ab744c3027637067d1571c7a345 Mon Sep 17 00:00:00 2001
From: Pooja Babu
Date: Mon, 20 Nov 2023 16:37:56 +0100
Subject: [PATCH] Fix autodoc test
---
tests/pynestml_frontend_test.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/tests/pynestml_frontend_test.py b/tests/pynestml_frontend_test.py
index 7ffe0bcdf..e5af81d77 100644
--- a/tests/pynestml_frontend_test.py
+++ b/tests/pynestml_frontend_test.py
@@ -44,7 +44,6 @@ def test_codegeneration_autodoc(self):
path = str(os.path.realpath(os.path.join(os.path.dirname(__file__),
os.path.join(os.pardir, "models", "neurons", "iaf_psc_exp_neuron.nestml"))))
params = list()
- params.append("nestml")
params.append("--input_path")
params.append(path)
params.append("--target_platform")
@@ -56,10 +55,8 @@ def test_codegeneration_autodoc(self):
params.append("--store_log")
params.append("--dev")
- exit_code = None
- with patch.object(sys, "argv", params):
- exit_code = main()
- self.assertTrue(exit_code == 0)
+ FrontendConfiguration.parse_config(params)
+ assert len(FrontendConfiguration.paths_to_compilation_units) == 1
def test_module_name_parsing_right_module_name_specified(self):
path = str(os.path.realpath(os.path.join(os.path.dirname(__file__), os.path.join(os.pardir, "models"))))