def test_multi_sync_env_runner_log_data_interaction_no_data_logger( mock_task, mock_agent): # Assign env_runner = MultiSyncEnvRunner(mock_task, mock_agent) # Act env_runner.log_data_interaction() # Assert mock_agent.log_metrics.assert_not_called()
def test_multi_sync_env_runner_log_data_interaction_iterations( mock_data_logger): # Assign test_agent.log_metrics = mock.MagicMock() env_runner = MultiSyncEnvRunner([test_task], test_agent, data_logger=mock_data_logger) # Act env_runner.run(max_episodes=1, max_iterations=10, log_episode_freq=2) env_runner.log_data_interaction() # Assert test_agent.log_metrics.assert_called_once_with(mock_data_logger, 10, full_log=False) assert mock_data_logger.log_values_dict.call_count == 0 assert mock_data_logger.log_value.call_count == 0