Skip to content

Commit

Permalink
tests: Applied fixture to csv tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gtdang committed May 8, 2024
1 parent 265ce9c commit ff803c7
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions hnn_core/tests/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,15 +543,12 @@ def add_child_decorated(self, to_add):
assert gui.tab_group_2.selected_index == 0


def test_gui_download_simulation():
def test_gui_download_simulation(setup_gui):
"""Test the GUI download simulation pipeline."""
gui = HNNGUI()
_ = gui.compose()
gui.params['N_pyr_x'] = 3
gui.params['N_pyr_y'] = 3

# Run a simulation with 3 trials
gui.widget_dt.value = 0.85
gui = setup_gui

# Run a simulation with 2 trials
gui.widget_ntrials.value = 2

# Initiate 1rs simulation
Expand All @@ -567,7 +564,6 @@ def test_gui_download_simulation():
assert file_extension == ".zip"

# Run a simulation with 1 trials
gui.widget_dt.value = 0.85
gui.widget_ntrials.value = 1

# Initiate 2nd simulation
Expand All @@ -582,10 +578,10 @@ def test_gui_download_simulation():
assert file_extension == ".csv"


def test_gui_upload_csv_simulation():
def test_gui_upload_csv_simulation(setup_gui):
"""Test if gui handles uploaded csv data"""
gui = HNNGUI()
_ = gui.compose()

gui = setup_gui

assert len(gui.viz_manager.data['figs']) == 0
assert len(gui.data['simulation_data']) == 0
Expand Down

0 comments on commit ff803c7

Please sign in to comment.