Skip to content

Commit

Permalink
EBR-20: fix unit-test
Browse files Browse the repository at this point in the history
  • Loading branch information
915-Misan-Teodora committed Mar 5, 2024
1 parent fbd08f6 commit 0b1e5c7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tvbextxircuits/tests/xircuits/test_notebook_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import shutil
import pytest
from tvbextxircuits import nb_generator
from tvbextxircuits.nb_generator import NotebookGenerator, NotebookFactory, USE_ABSOLUTE_PATHS
from tvbextxircuits.nb_generator import NotebookGenerator, NotebookFactory
from xai_components.xai_tvb_simulator.simulator import Simulator


Expand Down Expand Up @@ -39,10 +39,7 @@ def test_widget_code_generator():
'xircuits_id')
assert notebook is not None
assert "models.ReducedWongWang(**{})" in notebook.cells[2]['source']
if USE_ABSOLUTE_PATHS:
assert f"w.export_filename = r'{os.path.join('temp_test_dir', 'xircuits_id', 'model_model_id')}" in notebook.cells[2]['source']
else:
assert "w.export_filename = r'model_model_id'" in notebook.cells[2]['source']
assert "w.export_filename = r'model_model_id'" in notebook.cells[2]['source']

assert len(os.listdir(nb_generator.NOTEBOOKS_DIR)) == 0
notebook_path = notebook_factory.store(notebook, 'model', 'xircuits_id')
Expand Down

0 comments on commit 0b1e5c7

Please sign in to comment.