Skip to content

Commit

Permalink
board_type in cfg setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Jul 10, 2023
1 parent 7e9651e commit 02ebcf7
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions spinnaker_graph_front_end/config_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ def setup_configs():
:py:func:`~spinnaker_graph_front_end.setup` is called.
"""
clear_cfg_files(False)
add_spinnaker_cfg() # This add its dependencies too
add_spinnaker_cfg(board_type=None) # This add its dependencies too
set_cfg_files(
config_file=CONFIG_FILE_NAME,
default=os.path.join(os.path.dirname(__file__), CONFIG_FILE_NAME))
FecDataWriter.mock()


def unittest_setup():
def unittest_setup(*, board_type=None):
"""
Does all the steps that may be required before a unit test.
Expand All @@ -56,7 +56,17 @@ def unittest_setup():
.. note::
This file should only be called from spinnaker_graph_front_end tests
that do not call :py:func:`~spinnaker_graph_front_end.setup`.
.. note::
This file should only be called from sPyNNaker tests
that do not call `sim.setup`
:param board_type: Value to say how to confuire the system.
This includes defining what a VirtualMachine would be
Can be 1 for Spin1 boards, 2 for Spin2 boards or
None if the test do not depend on knowing the board type.
:type board_type: None or int
"""
clear_cfg_files(True)
add_spinnaker_cfg() # This add its dependencies too
add_default_cfg(os.path.join(os.path.dirname(__file__), CONFIG_FILE_NAME))
add_spinnaker_cfg(board_type) # This add its dependencies too

0 comments on commit 02ebcf7

Please sign in to comment.