#2716 Agent logging now sits outside of the simulation output log directory, updated dev-mode CLI to include agent logging and added additional tests.

This commit is contained in:
Archer.Bowen
2024-07-10 13:36:37 +01:00
parent 48645d2e72
commit 239f5b86c0
11 changed files with 187 additions and 55 deletions

View File

@@ -29,11 +29,11 @@ def test_debug_agent_log_level(agentlog, capsys):
test_string = str(uuid4())
agentlog.debug(msg=test_string, time_step=0)
agentlog.info(msg=test_string, time_step=0)
agentlog.warning(msg=test_string, time_step=0)
agentlog.error(msg=test_string, time_step=0)
agentlog.critical(msg=test_string, time_step=0)
agentlog.debug(msg=test_string)
agentlog.info(msg=test_string)
agentlog.warning(msg=test_string)
agentlog.error(msg=test_string)
agentlog.critical(msg=test_string)
captured = "".join(capsys.readouterr())
@@ -52,11 +52,11 @@ def test_info_agent_log_level(agentlog, capsys):
test_string = str(uuid4())
agentlog.debug(msg=test_string, time_step=0)
agentlog.info(msg=test_string, time_step=0)
agentlog.warning(msg=test_string, time_step=0)
agentlog.error(msg=test_string, time_step=0)
agentlog.critical(msg=test_string, time_step=0)
agentlog.debug(msg=test_string)
agentlog.info(msg=test_string)
agentlog.warning(msg=test_string)
agentlog.error(msg=test_string)
agentlog.critical(msg=test_string)
captured = "".join(capsys.readouterr())
@@ -75,11 +75,11 @@ def test_warning_agent_log_level(agentlog, capsys):
test_string = str(uuid4())
agentlog.debug(msg=test_string, time_step=0)
agentlog.info(msg=test_string, time_step=0)
agentlog.warning(msg=test_string, time_step=0)
agentlog.error(msg=test_string, time_step=0)
agentlog.critical(msg=test_string, time_step=0)
agentlog.debug(msg=test_string)
agentlog.info(msg=test_string)
agentlog.warning(msg=test_string)
agentlog.error(msg=test_string)
agentlog.critical(msg=test_string)
captured = "".join(capsys.readouterr())
@@ -98,11 +98,11 @@ def test_error_agent_log_level(agentlog, capsys):
test_string = str(uuid4())
agentlog.debug(msg=test_string, time_step=0)
agentlog.info(msg=test_string, time_step=0)
agentlog.warning(msg=test_string, time_step=0)
agentlog.error(msg=test_string, time_step=0)
agentlog.critical(msg=test_string, time_step=0)
agentlog.debug(msg=test_string)
agentlog.info(msg=test_string)
agentlog.warning(msg=test_string)
agentlog.error(msg=test_string)
agentlog.critical(msg=test_string)
captured = "".join(capsys.readouterr())
@@ -121,11 +121,11 @@ def test_critical_agent_log_level(agentlog, capsys):
test_string = str(uuid4())
agentlog.debug(msg=test_string, time_step=0)
agentlog.info(msg=test_string, time_step=0)
agentlog.warning(msg=test_string, time_step=0)
agentlog.error(msg=test_string, time_step=0)
agentlog.critical(msg=test_string, time_step=0)
agentlog.debug(msg=test_string)
agentlog.info(msg=test_string)
agentlog.warning(msg=test_string)
agentlog.error(msg=test_string)
agentlog.critical(msg=test_string)
captured = "".join(capsys.readouterr())