-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
I encountered an error in the LED tutorial during execution of the integration test. It looks like the command LedBlinker.cmdDisp.CMD_NO_OP is not in "the dictionary"
$ pytest ../Components/Led/test/int/led_integration_tests.py
I get the error:
pytest ../Components/Led/test/int/led_integration_tests.py
======================================================================= test session starts ========================================================================
platform darwin -- Python 3.13.7, pytest-8.3.3, pluggy-1.5.0
rootdir: /Users/khavelun/Desktop/led-blinker/LedBlinker
plugins: fprime-gds-4.1.0
collected 1 item
../Components/Led/test/int/led_integration_tests.py F [100%]
============================================================================= FAILURES =============================================================================
__________________________________________________________________________ test_cmd_no_op __________________________________________________________________________
fprime_test_api = <fprime_gds.common.testing_fw.api.IntegrationTestAPI object at 0x106d834d0>
def test_cmd_no_op(fprime_test_api):
"""Test command CMD_NO_OP
Test that CMD_NO_OP can be sent and return without and errors
"""
fprime_test_api.send_and_assert_command("LedBlinker.cmdDisp.CMD_NO_OP")
../Components/Led/test/int/led_integration_tests.py:6:
../../fprime-venv/lib/python3.13/site-packages/fprime_gds/common/testing_fw/api.py:585: in send_and_assert_command
cmd_id = self.translate_command_name(command)
self = <fprime_gds.common.testing_fw.api.IntegrationTestAPI object at 0x106d834d0>, command = 'LedBlinker.cmdDisp.CMD_NO_OP'
def translate_command_name(self, command):
"""
This function will translate the given mnemonic into an ID as defined by the flight
software dictionary. This call will raise an error if the command given is not in the
dictionary.
Args:
command: Either the command id (int) or the command mnemonic (str)
Returns:
The command ID (int)
"""
if isinstance(command, str):
cmd_dict = self.pipeline.dictionaries.command_name
if command in cmd_dict:
return cmd_dict[command].get_id()
msg = f"The command mnemonic, {command}, wasn't in the dictionary"
else:
cmd_dict = self.pipeline.dictionaries.command_id
if command in cmd_dict:
return command
msg = f"The command id, {command}, wasn't in the dictionary"
raise KeyError(msg)
E KeyError: "The command mnemonic, LedBlinker.cmdDisp.CMD_NO_OP, wasn't in the dictionary"
../../fprime-venv/lib/python3.13/site-packages/fprime_gds/common/testing_fw/api.py:490: KeyError
---------------------------------------------------------------------- Captured stdout setup -----------------------------------------------------------------------
[INFO] Autodetected artifacts root '/Users/khavelun/Desktop/led-blinker/build-artifacts' from project settings.ini file.
13:34:30.205958 [Test API] [STARTING CASE] test_cmd_no_op
13:34:30.206213 [Test API] Clearing Test Histories
------------------------------------------------------------------------ Captured log setup ------------------------------------------------------------------------
INFO root:init.py:44 Logging system initialized!
INFO transport:zmq_transport.py:100 Outgoing connecting to: ipc:///tmp/fprime-server-in
INFO transport:zmq_transport.py:128 Incoming connecting to: ipc:///tmp/fprime-server-out
--------------------------------------------------------------------- Captured stdout teardown ---------------------------------------------------------------------
13:34:30.232087 [Test API] Clearing Test Histories
===================================================================== short test summary info ======================================================================
FAILED ../Components/Led/test/int/led_integration_tests.py::test_cmd_no_op - KeyError: "The command mnemonic, LedBlinker.cmdDisp.CMD_NO_OP, wasn't in the dictionary"
======================================================================== 1 failed in 0.16s =========================================================================
(fprime-venv) khavelun@MT-400313 LedBlinkerDeployment %
Metadata
Metadata
Assignees
Labels
Type
Projects
Status