From 315d391414e163f96ffd4e7ad902b796abe7a93d Mon Sep 17 00:00:00 2001 From: Engel Nyst Date: Sun, 17 Aug 2025 02:33:17 +0200 Subject: [PATCH] Revert "tests: reorganize unit tests into subdirectories mirroring source modules" (#10437) --- .github/workflows/py-tests.yml | 2 +- tests/unit/README.md | 6 +++--- tests/unit/{events => }/test_action_serialization.py | 0 tests/unit/{controller => }/test_agent_controller.py | 0 tests/unit/{controller => }/test_agent_delegation.py | 0 tests/unit/{server/session => }/test_agent_session.py | 0 tests/unit/{runtime/plugins => }/test_agent_skill.py | 0 tests/unit/{agenthub => }/test_agents.py | 0 tests/unit/{llm => }/test_api_connection_error_retry.py | 0 tests/unit/{core/config => }/test_arg_parser.py | 0 tests/unit/{utils => }/test_async_utils.py | 0 tests/unit/{utils => }/test_auto_generate_title.py | 0 tests/unit/{runtime/utils => }/test_bash_parsing.py | 0 tests/unit/{runtime/utils => }/test_bash_ps1_metadata.py | 0 tests/unit/{runtime/utils => }/test_bash_session.py | 0 tests/unit/{storage => }/test_batched_web_hook.py | 0 tests/unit/{integrations/bitbucket => }/test_bitbucket.py | 0 .../browsing_agent => }/test_browsing_agent_parser.py | 0 tests/unit/{utils => }/test_chunk_localizer.py | 0 tests/unit/{utils => }/test_circular_imports.py | 0 tests/unit/{cli => }/test_cli.py | 0 tests/unit/{cli => }/test_cli_alias_setup.py | 0 tests/unit/{cli => }/test_cli_commands.py | 0 tests/unit/{cli => }/test_cli_config_management.py | 0 tests/unit/{cli => }/test_cli_default_model.py | 0 .../{cli => }/test_cli_openhands_provider_auth_error.py | 0 tests/unit/{cli => }/test_cli_pause_resume.py | 0 tests/unit/{cli => }/test_cli_runtime_mcp.py | 0 tests/unit/{cli => }/test_cli_settings.py | 0 tests/unit/{cli => }/test_cli_setup_flow.py | 0 tests/unit/{cli => }/test_cli_suppress_warnings.py | 0 tests/unit/{cli => }/test_cli_thought_order.py | 0 tests/unit/{cli => }/test_cli_tui.py | 0 tests/unit/{cli => }/test_cli_utils.py | 0 tests/unit/{cli => }/test_cli_vi_mode.py | 0 tests/unit/{cli => }/test_cli_workspace.py | 0 tests/unit/{events => }/test_command_success.py | 0 tests/unit/{memory/condenser => }/test_condenser.py | 0 tests/unit/{core/config => }/test_config.py | 0 tests/unit/{core/config => }/test_config_dict_casting.py | 0 tests/unit/{core/config => }/test_config_extended.py | 0 tests/unit/{core/config => }/test_config_precedence.py | 0 tests/unit/{events => }/test_contextual_events.py | 0 tests/unit/{controller/state => }/test_control_flags.py | 0 tests/unit/{server/data_models => }/test_conversation.py | 0 tests/unit/{memory => }/test_conversation_memory.py | 0 tests/unit/{server/routes => }/test_conversation_routes.py | 0 tests/unit/{utils => }/test_conversation_summary.py | 0 .../condenser => }/test_conversation_window_condenser.py | 0 tests/unit/{runtime/impl => }/test_docker_runtime.py | 0 tests/unit/{memory => }/test_empty_image_url_fix_v2.py | 0 tests/unit/{events => }/test_event_serialization.py | 0 tests/unit/{events => }/test_event_stream.py | 0 tests/unit/{core/schema => }/test_exit_reason.py | 0 .../conversation => }/test_file_conversation_store.py | 0 tests/unit/{events => }/test_file_edit_observation.py | 0 .../unit/{storage/settings => }/test_file_settings_store.py | 0 tests/unit/{agenthub => }/test_function_calling.py | 0 .../{server/routes => }/test_get_repository_microagents.py | 0 tests/unit/{core/config => }/test_git_config.py | 0 tests/unit/{runtime/utils => }/test_git_handler.py | 0 tests/unit/{runtime => }/test_git_hooks.py | 0 tests/unit/{integrations/github => }/test_github_service.py | 0 tests/unit/{integrations/gitlab => }/test_gitlab.py | 0 .../{core/message => }/test_image_content_validation.py | 0 tests/unit/{utils => }/test_import_utils.py | 0 tests/unit/{io => }/test_io.py | 0 tests/unit/{controller => }/test_is_stuck.py | 0 tests/unit/{io => }/test_json.py | 0 tests/unit/{io => }/test_json_encoder.py | 0 tests/unit/{core/config => }/test_kubernetes_config.py | 0 tests/unit/{server => }/test_listen.py | 0 tests/unit/{runtime/impl => }/test_local_runtime.py | 0 tests/unit/{runtime/utils => }/test_log_streamer.py | 0 tests/unit/{core/logger => }/test_logger.py | 0 tests/unit/{core/logger => }/test_logger_litellm.py | 0 tests/unit/{core/logger => }/test_logging.py | 0 tests/unit/{events => }/test_mcp_action_observation.py | 0 tests/unit/{core/config => }/test_mcp_config.py | 0 tests/unit/{mcp => }/test_mcp_create_clients_timeout.py | 0 tests/unit/{mcp => }/test_mcp_error_collector.py | 0 tests/unit/{mcp => }/test_mcp_integration.py | 0 tests/unit/{server/routes => }/test_mcp_routes.py | 0 tests/unit/{core/config => }/test_mcp_settings_merge.py | 0 tests/unit/{mcp => }/test_mcp_timeout.py | 0 tests/unit/{mcp => }/test_mcp_tool_timeout_stall.py | 0 tests/unit/{mcp => }/test_mcp_utils.py | 0 tests/unit/{memory => }/test_memory.py | 0 tests/unit/{core/message => }/test_message_serialization.py | 0 tests/unit/{core/message => }/test_message_utils.py | 0 tests/unit/{microagent => }/test_microagent_no_header.py | 0 tests/unit/{microagent => }/test_microagent_utils.py | 0 tests/unit/{server => }/test_middleware.py | 0 tests/unit/{events => }/test_nested_event_store.py | 0 tests/unit/{events => }/test_observation_serialization.py | 0 tests/unit/{server => }/test_openapi_schema_generation.py | 0 tests/unit/{resolver => }/test_patch_whitespace.py | 0 tests/unit/{agenthub => }/test_prompt_caching.py | 0 tests/unit/{utils => }/test_prompt_manager.py | 0 tests/unit/{integrations => }/test_provider_immutability.py | 0 tests/unit/{runtime/builder => }/test_runtime_build.py | 0 tests/unit/{runtime => }/test_runtime_git_tokens.py | 0 tests/unit/{runtime => }/test_runtime_gitlab_microagents.py | 0 tests/unit/{runtime => }/test_runtime_import_robustness.py | 0 tests/unit/{runtime => }/test_runtime_reboot.py | 0 tests/unit/{utils => }/test_search_utils.py | 0 tests/unit/{storage/data_models => }/test_secret_store.py | 0 tests/unit/{server/routes => }/test_secrets_api.py | 0 tests/unit/{security => }/test_security.py | 0 tests/unit/{server/session => }/test_session.py | 0 tests/unit/{storage/data_models => }/test_settings.py | 0 tests/unit/{server/routes => }/test_settings_api.py | 0 .../{server/routes => }/test_settings_store_functions.py | 0 tests/unit/{runtime => }/test_setup.py | 0 tests/unit/{utils => }/test_shutdown_listener.py | 0 tests/unit/{server => }/test_socket_events.py | 0 .../test_standalone_conversation_manager.py | 0 tests/unit/{controller/state => }/test_state.py | 0 tests/unit/{storage => }/test_storage.py | 0 .../unit/{integrations/github => }/test_suggested_tasks.py | 0 tests/unit/{microagent => }/test_user_microagents.py | 0 tests/unit/{memory => }/test_view.py | 0 tests/unit/{runtime/utils => }/test_windows_bash.py | 0 tests/unit/{agenthub => }/test_windows_prompt_refinement.py | 0 124 files changed, 4 insertions(+), 4 deletions(-) rename tests/unit/{events => }/test_action_serialization.py (100%) rename tests/unit/{controller => }/test_agent_controller.py (100%) rename tests/unit/{controller => }/test_agent_delegation.py (100%) rename tests/unit/{server/session => }/test_agent_session.py (100%) rename tests/unit/{runtime/plugins => }/test_agent_skill.py (100%) rename tests/unit/{agenthub => }/test_agents.py (100%) rename tests/unit/{llm => }/test_api_connection_error_retry.py (100%) rename tests/unit/{core/config => }/test_arg_parser.py (100%) rename tests/unit/{utils => }/test_async_utils.py (100%) rename tests/unit/{utils => }/test_auto_generate_title.py (100%) rename tests/unit/{runtime/utils => }/test_bash_parsing.py (100%) rename tests/unit/{runtime/utils => }/test_bash_ps1_metadata.py (100%) rename tests/unit/{runtime/utils => }/test_bash_session.py (100%) rename tests/unit/{storage => }/test_batched_web_hook.py (100%) rename tests/unit/{integrations/bitbucket => }/test_bitbucket.py (100%) rename tests/unit/{agenthub/browsing_agent => }/test_browsing_agent_parser.py (100%) rename tests/unit/{utils => }/test_chunk_localizer.py (100%) rename tests/unit/{utils => }/test_circular_imports.py (100%) rename tests/unit/{cli => }/test_cli.py (100%) rename tests/unit/{cli => }/test_cli_alias_setup.py (100%) rename tests/unit/{cli => }/test_cli_commands.py (100%) rename tests/unit/{cli => }/test_cli_config_management.py (100%) rename tests/unit/{cli => }/test_cli_default_model.py (100%) rename tests/unit/{cli => }/test_cli_openhands_provider_auth_error.py (100%) rename tests/unit/{cli => }/test_cli_pause_resume.py (100%) rename tests/unit/{cli => }/test_cli_runtime_mcp.py (100%) rename tests/unit/{cli => }/test_cli_settings.py (100%) rename tests/unit/{cli => }/test_cli_setup_flow.py (100%) rename tests/unit/{cli => }/test_cli_suppress_warnings.py (100%) rename tests/unit/{cli => }/test_cli_thought_order.py (100%) rename tests/unit/{cli => }/test_cli_tui.py (100%) rename tests/unit/{cli => }/test_cli_utils.py (100%) rename tests/unit/{cli => }/test_cli_vi_mode.py (100%) rename tests/unit/{cli => }/test_cli_workspace.py (100%) rename tests/unit/{events => }/test_command_success.py (100%) rename tests/unit/{memory/condenser => }/test_condenser.py (100%) rename tests/unit/{core/config => }/test_config.py (100%) rename tests/unit/{core/config => }/test_config_dict_casting.py (100%) rename tests/unit/{core/config => }/test_config_extended.py (100%) rename tests/unit/{core/config => }/test_config_precedence.py (100%) rename tests/unit/{events => }/test_contextual_events.py (100%) rename tests/unit/{controller/state => }/test_control_flags.py (100%) rename tests/unit/{server/data_models => }/test_conversation.py (100%) rename tests/unit/{memory => }/test_conversation_memory.py (100%) rename tests/unit/{server/routes => }/test_conversation_routes.py (100%) rename tests/unit/{utils => }/test_conversation_summary.py (100%) rename tests/unit/{memory/condenser => }/test_conversation_window_condenser.py (100%) rename tests/unit/{runtime/impl => }/test_docker_runtime.py (100%) rename tests/unit/{memory => }/test_empty_image_url_fix_v2.py (100%) rename tests/unit/{events => }/test_event_serialization.py (100%) rename tests/unit/{events => }/test_event_stream.py (100%) rename tests/unit/{core/schema => }/test_exit_reason.py (100%) rename tests/unit/{storage/conversation => }/test_file_conversation_store.py (100%) rename tests/unit/{events => }/test_file_edit_observation.py (100%) rename tests/unit/{storage/settings => }/test_file_settings_store.py (100%) rename tests/unit/{agenthub => }/test_function_calling.py (100%) rename tests/unit/{server/routes => }/test_get_repository_microagents.py (100%) rename tests/unit/{core/config => }/test_git_config.py (100%) rename tests/unit/{runtime/utils => }/test_git_handler.py (100%) rename tests/unit/{runtime => }/test_git_hooks.py (100%) rename tests/unit/{integrations/github => }/test_github_service.py (100%) rename tests/unit/{integrations/gitlab => }/test_gitlab.py (100%) rename tests/unit/{core/message => }/test_image_content_validation.py (100%) rename tests/unit/{utils => }/test_import_utils.py (100%) rename tests/unit/{io => }/test_io.py (100%) rename tests/unit/{controller => }/test_is_stuck.py (100%) rename tests/unit/{io => }/test_json.py (100%) rename tests/unit/{io => }/test_json_encoder.py (100%) rename tests/unit/{core/config => }/test_kubernetes_config.py (100%) rename tests/unit/{server => }/test_listen.py (100%) rename tests/unit/{runtime/impl => }/test_local_runtime.py (100%) rename tests/unit/{runtime/utils => }/test_log_streamer.py (100%) rename tests/unit/{core/logger => }/test_logger.py (100%) rename tests/unit/{core/logger => }/test_logger_litellm.py (100%) rename tests/unit/{core/logger => }/test_logging.py (100%) rename tests/unit/{events => }/test_mcp_action_observation.py (100%) rename tests/unit/{core/config => }/test_mcp_config.py (100%) rename tests/unit/{mcp => }/test_mcp_create_clients_timeout.py (100%) rename tests/unit/{mcp => }/test_mcp_error_collector.py (100%) rename tests/unit/{mcp => }/test_mcp_integration.py (100%) rename tests/unit/{server/routes => }/test_mcp_routes.py (100%) rename tests/unit/{core/config => }/test_mcp_settings_merge.py (100%) rename tests/unit/{mcp => }/test_mcp_timeout.py (100%) rename tests/unit/{mcp => }/test_mcp_tool_timeout_stall.py (100%) rename tests/unit/{mcp => }/test_mcp_utils.py (100%) rename tests/unit/{memory => }/test_memory.py (100%) rename tests/unit/{core/message => }/test_message_serialization.py (100%) rename tests/unit/{core/message => }/test_message_utils.py (100%) rename tests/unit/{microagent => }/test_microagent_no_header.py (100%) rename tests/unit/{microagent => }/test_microagent_utils.py (100%) rename tests/unit/{server => }/test_middleware.py (100%) rename tests/unit/{events => }/test_nested_event_store.py (100%) rename tests/unit/{events => }/test_observation_serialization.py (100%) rename tests/unit/{server => }/test_openapi_schema_generation.py (100%) rename tests/unit/{resolver => }/test_patch_whitespace.py (100%) rename tests/unit/{agenthub => }/test_prompt_caching.py (100%) rename tests/unit/{utils => }/test_prompt_manager.py (100%) rename tests/unit/{integrations => }/test_provider_immutability.py (100%) rename tests/unit/{runtime/builder => }/test_runtime_build.py (100%) rename tests/unit/{runtime => }/test_runtime_git_tokens.py (100%) rename tests/unit/{runtime => }/test_runtime_gitlab_microagents.py (100%) rename tests/unit/{runtime => }/test_runtime_import_robustness.py (100%) rename tests/unit/{runtime => }/test_runtime_reboot.py (100%) rename tests/unit/{utils => }/test_search_utils.py (100%) rename tests/unit/{storage/data_models => }/test_secret_store.py (100%) rename tests/unit/{server/routes => }/test_secrets_api.py (100%) rename tests/unit/{security => }/test_security.py (100%) rename tests/unit/{server/session => }/test_session.py (100%) rename tests/unit/{storage/data_models => }/test_settings.py (100%) rename tests/unit/{server/routes => }/test_settings_api.py (100%) rename tests/unit/{server/routes => }/test_settings_store_functions.py (100%) rename tests/unit/{runtime => }/test_setup.py (100%) rename tests/unit/{utils => }/test_shutdown_listener.py (100%) rename tests/unit/{server => }/test_socket_events.py (100%) rename tests/unit/{server/conversation_manager => }/test_standalone_conversation_manager.py (100%) rename tests/unit/{controller/state => }/test_state.py (100%) rename tests/unit/{storage => }/test_storage.py (100%) rename tests/unit/{integrations/github => }/test_suggested_tasks.py (100%) rename tests/unit/{microagent => }/test_user_microagents.py (100%) rename tests/unit/{memory => }/test_view.py (100%) rename tests/unit/{runtime/utils => }/test_windows_bash.py (100%) rename tests/unit/{agenthub => }/test_windows_prompt_refinement.py (100%) diff --git a/.github/workflows/py-tests.yml b/.github/workflows/py-tests.yml index 4d9ecdbe30..c7ea6bfa08 100644 --- a/.github/workflows/py-tests.yml +++ b/.github/workflows/py-tests.yml @@ -73,7 +73,7 @@ jobs: - name: Install Python dependencies using Poetry run: poetry install --with dev,test,runtime - name: Run Windows unit tests - run: poetry run pytest -svv tests/unit/runtime/utils/test_windows_bash.py + run: poetry run pytest -svv tests/unit/test_windows_bash.py env: PYTHONPATH: ".;$env:PYTHONPATH" DEBUG: "1" diff --git a/tests/unit/README.md b/tests/unit/README.md index 5860f285f9..ae4d99e511 100644 --- a/tests/unit/README.md +++ b/tests/unit/README.md @@ -11,19 +11,19 @@ poetry run pytest ./tests/unit Run specific test file: ```bash -poetry run pytest ./tests/unit/llm/test_llm_fncall_converter.py +poetry run pytest ./tests/unit/test_llm_fncall_converter.py ``` Run specific unit test ```bash -poetry run pytest ./tests/unit/llm/test_llm_fncall_converter.py::test_convert_tool_call_to_string +poetry run pytest ./tests/unit/test_llm_fncall_converter.py::test_convert_tool_call_to_string ``` For a more verbose output, to above calls the `-v` flag can be used (even more verbose: `-vv` and `-vvv`): ```bash -poetry run pytest -v ./tests/unit/llm/test_llm_fncall_converter.py +poetry run pytest -v ./tests/unit/test_llm_fncall_converter.py ``` More details see [pytest doc](https://docs.pytest.org/en/latest/contents.html) diff --git a/tests/unit/events/test_action_serialization.py b/tests/unit/test_action_serialization.py similarity index 100% rename from tests/unit/events/test_action_serialization.py rename to tests/unit/test_action_serialization.py diff --git a/tests/unit/controller/test_agent_controller.py b/tests/unit/test_agent_controller.py similarity index 100% rename from tests/unit/controller/test_agent_controller.py rename to tests/unit/test_agent_controller.py diff --git a/tests/unit/controller/test_agent_delegation.py b/tests/unit/test_agent_delegation.py similarity index 100% rename from tests/unit/controller/test_agent_delegation.py rename to tests/unit/test_agent_delegation.py diff --git a/tests/unit/server/session/test_agent_session.py b/tests/unit/test_agent_session.py similarity index 100% rename from tests/unit/server/session/test_agent_session.py rename to tests/unit/test_agent_session.py diff --git a/tests/unit/runtime/plugins/test_agent_skill.py b/tests/unit/test_agent_skill.py similarity index 100% rename from tests/unit/runtime/plugins/test_agent_skill.py rename to tests/unit/test_agent_skill.py diff --git a/tests/unit/agenthub/test_agents.py b/tests/unit/test_agents.py similarity index 100% rename from tests/unit/agenthub/test_agents.py rename to tests/unit/test_agents.py diff --git a/tests/unit/llm/test_api_connection_error_retry.py b/tests/unit/test_api_connection_error_retry.py similarity index 100% rename from tests/unit/llm/test_api_connection_error_retry.py rename to tests/unit/test_api_connection_error_retry.py diff --git a/tests/unit/core/config/test_arg_parser.py b/tests/unit/test_arg_parser.py similarity index 100% rename from tests/unit/core/config/test_arg_parser.py rename to tests/unit/test_arg_parser.py diff --git a/tests/unit/utils/test_async_utils.py b/tests/unit/test_async_utils.py similarity index 100% rename from tests/unit/utils/test_async_utils.py rename to tests/unit/test_async_utils.py diff --git a/tests/unit/utils/test_auto_generate_title.py b/tests/unit/test_auto_generate_title.py similarity index 100% rename from tests/unit/utils/test_auto_generate_title.py rename to tests/unit/test_auto_generate_title.py diff --git a/tests/unit/runtime/utils/test_bash_parsing.py b/tests/unit/test_bash_parsing.py similarity index 100% rename from tests/unit/runtime/utils/test_bash_parsing.py rename to tests/unit/test_bash_parsing.py diff --git a/tests/unit/runtime/utils/test_bash_ps1_metadata.py b/tests/unit/test_bash_ps1_metadata.py similarity index 100% rename from tests/unit/runtime/utils/test_bash_ps1_metadata.py rename to tests/unit/test_bash_ps1_metadata.py diff --git a/tests/unit/runtime/utils/test_bash_session.py b/tests/unit/test_bash_session.py similarity index 100% rename from tests/unit/runtime/utils/test_bash_session.py rename to tests/unit/test_bash_session.py diff --git a/tests/unit/storage/test_batched_web_hook.py b/tests/unit/test_batched_web_hook.py similarity index 100% rename from tests/unit/storage/test_batched_web_hook.py rename to tests/unit/test_batched_web_hook.py diff --git a/tests/unit/integrations/bitbucket/test_bitbucket.py b/tests/unit/test_bitbucket.py similarity index 100% rename from tests/unit/integrations/bitbucket/test_bitbucket.py rename to tests/unit/test_bitbucket.py diff --git a/tests/unit/agenthub/browsing_agent/test_browsing_agent_parser.py b/tests/unit/test_browsing_agent_parser.py similarity index 100% rename from tests/unit/agenthub/browsing_agent/test_browsing_agent_parser.py rename to tests/unit/test_browsing_agent_parser.py diff --git a/tests/unit/utils/test_chunk_localizer.py b/tests/unit/test_chunk_localizer.py similarity index 100% rename from tests/unit/utils/test_chunk_localizer.py rename to tests/unit/test_chunk_localizer.py diff --git a/tests/unit/utils/test_circular_imports.py b/tests/unit/test_circular_imports.py similarity index 100% rename from tests/unit/utils/test_circular_imports.py rename to tests/unit/test_circular_imports.py diff --git a/tests/unit/cli/test_cli.py b/tests/unit/test_cli.py similarity index 100% rename from tests/unit/cli/test_cli.py rename to tests/unit/test_cli.py diff --git a/tests/unit/cli/test_cli_alias_setup.py b/tests/unit/test_cli_alias_setup.py similarity index 100% rename from tests/unit/cli/test_cli_alias_setup.py rename to tests/unit/test_cli_alias_setup.py diff --git a/tests/unit/cli/test_cli_commands.py b/tests/unit/test_cli_commands.py similarity index 100% rename from tests/unit/cli/test_cli_commands.py rename to tests/unit/test_cli_commands.py diff --git a/tests/unit/cli/test_cli_config_management.py b/tests/unit/test_cli_config_management.py similarity index 100% rename from tests/unit/cli/test_cli_config_management.py rename to tests/unit/test_cli_config_management.py diff --git a/tests/unit/cli/test_cli_default_model.py b/tests/unit/test_cli_default_model.py similarity index 100% rename from tests/unit/cli/test_cli_default_model.py rename to tests/unit/test_cli_default_model.py diff --git a/tests/unit/cli/test_cli_openhands_provider_auth_error.py b/tests/unit/test_cli_openhands_provider_auth_error.py similarity index 100% rename from tests/unit/cli/test_cli_openhands_provider_auth_error.py rename to tests/unit/test_cli_openhands_provider_auth_error.py diff --git a/tests/unit/cli/test_cli_pause_resume.py b/tests/unit/test_cli_pause_resume.py similarity index 100% rename from tests/unit/cli/test_cli_pause_resume.py rename to tests/unit/test_cli_pause_resume.py diff --git a/tests/unit/cli/test_cli_runtime_mcp.py b/tests/unit/test_cli_runtime_mcp.py similarity index 100% rename from tests/unit/cli/test_cli_runtime_mcp.py rename to tests/unit/test_cli_runtime_mcp.py diff --git a/tests/unit/cli/test_cli_settings.py b/tests/unit/test_cli_settings.py similarity index 100% rename from tests/unit/cli/test_cli_settings.py rename to tests/unit/test_cli_settings.py diff --git a/tests/unit/cli/test_cli_setup_flow.py b/tests/unit/test_cli_setup_flow.py similarity index 100% rename from tests/unit/cli/test_cli_setup_flow.py rename to tests/unit/test_cli_setup_flow.py diff --git a/tests/unit/cli/test_cli_suppress_warnings.py b/tests/unit/test_cli_suppress_warnings.py similarity index 100% rename from tests/unit/cli/test_cli_suppress_warnings.py rename to tests/unit/test_cli_suppress_warnings.py diff --git a/tests/unit/cli/test_cli_thought_order.py b/tests/unit/test_cli_thought_order.py similarity index 100% rename from tests/unit/cli/test_cli_thought_order.py rename to tests/unit/test_cli_thought_order.py diff --git a/tests/unit/cli/test_cli_tui.py b/tests/unit/test_cli_tui.py similarity index 100% rename from tests/unit/cli/test_cli_tui.py rename to tests/unit/test_cli_tui.py diff --git a/tests/unit/cli/test_cli_utils.py b/tests/unit/test_cli_utils.py similarity index 100% rename from tests/unit/cli/test_cli_utils.py rename to tests/unit/test_cli_utils.py diff --git a/tests/unit/cli/test_cli_vi_mode.py b/tests/unit/test_cli_vi_mode.py similarity index 100% rename from tests/unit/cli/test_cli_vi_mode.py rename to tests/unit/test_cli_vi_mode.py diff --git a/tests/unit/cli/test_cli_workspace.py b/tests/unit/test_cli_workspace.py similarity index 100% rename from tests/unit/cli/test_cli_workspace.py rename to tests/unit/test_cli_workspace.py diff --git a/tests/unit/events/test_command_success.py b/tests/unit/test_command_success.py similarity index 100% rename from tests/unit/events/test_command_success.py rename to tests/unit/test_command_success.py diff --git a/tests/unit/memory/condenser/test_condenser.py b/tests/unit/test_condenser.py similarity index 100% rename from tests/unit/memory/condenser/test_condenser.py rename to tests/unit/test_condenser.py diff --git a/tests/unit/core/config/test_config.py b/tests/unit/test_config.py similarity index 100% rename from tests/unit/core/config/test_config.py rename to tests/unit/test_config.py diff --git a/tests/unit/core/config/test_config_dict_casting.py b/tests/unit/test_config_dict_casting.py similarity index 100% rename from tests/unit/core/config/test_config_dict_casting.py rename to tests/unit/test_config_dict_casting.py diff --git a/tests/unit/core/config/test_config_extended.py b/tests/unit/test_config_extended.py similarity index 100% rename from tests/unit/core/config/test_config_extended.py rename to tests/unit/test_config_extended.py diff --git a/tests/unit/core/config/test_config_precedence.py b/tests/unit/test_config_precedence.py similarity index 100% rename from tests/unit/core/config/test_config_precedence.py rename to tests/unit/test_config_precedence.py diff --git a/tests/unit/events/test_contextual_events.py b/tests/unit/test_contextual_events.py similarity index 100% rename from tests/unit/events/test_contextual_events.py rename to tests/unit/test_contextual_events.py diff --git a/tests/unit/controller/state/test_control_flags.py b/tests/unit/test_control_flags.py similarity index 100% rename from tests/unit/controller/state/test_control_flags.py rename to tests/unit/test_control_flags.py diff --git a/tests/unit/server/data_models/test_conversation.py b/tests/unit/test_conversation.py similarity index 100% rename from tests/unit/server/data_models/test_conversation.py rename to tests/unit/test_conversation.py diff --git a/tests/unit/memory/test_conversation_memory.py b/tests/unit/test_conversation_memory.py similarity index 100% rename from tests/unit/memory/test_conversation_memory.py rename to tests/unit/test_conversation_memory.py diff --git a/tests/unit/server/routes/test_conversation_routes.py b/tests/unit/test_conversation_routes.py similarity index 100% rename from tests/unit/server/routes/test_conversation_routes.py rename to tests/unit/test_conversation_routes.py diff --git a/tests/unit/utils/test_conversation_summary.py b/tests/unit/test_conversation_summary.py similarity index 100% rename from tests/unit/utils/test_conversation_summary.py rename to tests/unit/test_conversation_summary.py diff --git a/tests/unit/memory/condenser/test_conversation_window_condenser.py b/tests/unit/test_conversation_window_condenser.py similarity index 100% rename from tests/unit/memory/condenser/test_conversation_window_condenser.py rename to tests/unit/test_conversation_window_condenser.py diff --git a/tests/unit/runtime/impl/test_docker_runtime.py b/tests/unit/test_docker_runtime.py similarity index 100% rename from tests/unit/runtime/impl/test_docker_runtime.py rename to tests/unit/test_docker_runtime.py diff --git a/tests/unit/memory/test_empty_image_url_fix_v2.py b/tests/unit/test_empty_image_url_fix_v2.py similarity index 100% rename from tests/unit/memory/test_empty_image_url_fix_v2.py rename to tests/unit/test_empty_image_url_fix_v2.py diff --git a/tests/unit/events/test_event_serialization.py b/tests/unit/test_event_serialization.py similarity index 100% rename from tests/unit/events/test_event_serialization.py rename to tests/unit/test_event_serialization.py diff --git a/tests/unit/events/test_event_stream.py b/tests/unit/test_event_stream.py similarity index 100% rename from tests/unit/events/test_event_stream.py rename to tests/unit/test_event_stream.py diff --git a/tests/unit/core/schema/test_exit_reason.py b/tests/unit/test_exit_reason.py similarity index 100% rename from tests/unit/core/schema/test_exit_reason.py rename to tests/unit/test_exit_reason.py diff --git a/tests/unit/storage/conversation/test_file_conversation_store.py b/tests/unit/test_file_conversation_store.py similarity index 100% rename from tests/unit/storage/conversation/test_file_conversation_store.py rename to tests/unit/test_file_conversation_store.py diff --git a/tests/unit/events/test_file_edit_observation.py b/tests/unit/test_file_edit_observation.py similarity index 100% rename from tests/unit/events/test_file_edit_observation.py rename to tests/unit/test_file_edit_observation.py diff --git a/tests/unit/storage/settings/test_file_settings_store.py b/tests/unit/test_file_settings_store.py similarity index 100% rename from tests/unit/storage/settings/test_file_settings_store.py rename to tests/unit/test_file_settings_store.py diff --git a/tests/unit/agenthub/test_function_calling.py b/tests/unit/test_function_calling.py similarity index 100% rename from tests/unit/agenthub/test_function_calling.py rename to tests/unit/test_function_calling.py diff --git a/tests/unit/server/routes/test_get_repository_microagents.py b/tests/unit/test_get_repository_microagents.py similarity index 100% rename from tests/unit/server/routes/test_get_repository_microagents.py rename to tests/unit/test_get_repository_microagents.py diff --git a/tests/unit/core/config/test_git_config.py b/tests/unit/test_git_config.py similarity index 100% rename from tests/unit/core/config/test_git_config.py rename to tests/unit/test_git_config.py diff --git a/tests/unit/runtime/utils/test_git_handler.py b/tests/unit/test_git_handler.py similarity index 100% rename from tests/unit/runtime/utils/test_git_handler.py rename to tests/unit/test_git_handler.py diff --git a/tests/unit/runtime/test_git_hooks.py b/tests/unit/test_git_hooks.py similarity index 100% rename from tests/unit/runtime/test_git_hooks.py rename to tests/unit/test_git_hooks.py diff --git a/tests/unit/integrations/github/test_github_service.py b/tests/unit/test_github_service.py similarity index 100% rename from tests/unit/integrations/github/test_github_service.py rename to tests/unit/test_github_service.py diff --git a/tests/unit/integrations/gitlab/test_gitlab.py b/tests/unit/test_gitlab.py similarity index 100% rename from tests/unit/integrations/gitlab/test_gitlab.py rename to tests/unit/test_gitlab.py diff --git a/tests/unit/core/message/test_image_content_validation.py b/tests/unit/test_image_content_validation.py similarity index 100% rename from tests/unit/core/message/test_image_content_validation.py rename to tests/unit/test_image_content_validation.py diff --git a/tests/unit/utils/test_import_utils.py b/tests/unit/test_import_utils.py similarity index 100% rename from tests/unit/utils/test_import_utils.py rename to tests/unit/test_import_utils.py diff --git a/tests/unit/io/test_io.py b/tests/unit/test_io.py similarity index 100% rename from tests/unit/io/test_io.py rename to tests/unit/test_io.py diff --git a/tests/unit/controller/test_is_stuck.py b/tests/unit/test_is_stuck.py similarity index 100% rename from tests/unit/controller/test_is_stuck.py rename to tests/unit/test_is_stuck.py diff --git a/tests/unit/io/test_json.py b/tests/unit/test_json.py similarity index 100% rename from tests/unit/io/test_json.py rename to tests/unit/test_json.py diff --git a/tests/unit/io/test_json_encoder.py b/tests/unit/test_json_encoder.py similarity index 100% rename from tests/unit/io/test_json_encoder.py rename to tests/unit/test_json_encoder.py diff --git a/tests/unit/core/config/test_kubernetes_config.py b/tests/unit/test_kubernetes_config.py similarity index 100% rename from tests/unit/core/config/test_kubernetes_config.py rename to tests/unit/test_kubernetes_config.py diff --git a/tests/unit/server/test_listen.py b/tests/unit/test_listen.py similarity index 100% rename from tests/unit/server/test_listen.py rename to tests/unit/test_listen.py diff --git a/tests/unit/runtime/impl/test_local_runtime.py b/tests/unit/test_local_runtime.py similarity index 100% rename from tests/unit/runtime/impl/test_local_runtime.py rename to tests/unit/test_local_runtime.py diff --git a/tests/unit/runtime/utils/test_log_streamer.py b/tests/unit/test_log_streamer.py similarity index 100% rename from tests/unit/runtime/utils/test_log_streamer.py rename to tests/unit/test_log_streamer.py diff --git a/tests/unit/core/logger/test_logger.py b/tests/unit/test_logger.py similarity index 100% rename from tests/unit/core/logger/test_logger.py rename to tests/unit/test_logger.py diff --git a/tests/unit/core/logger/test_logger_litellm.py b/tests/unit/test_logger_litellm.py similarity index 100% rename from tests/unit/core/logger/test_logger_litellm.py rename to tests/unit/test_logger_litellm.py diff --git a/tests/unit/core/logger/test_logging.py b/tests/unit/test_logging.py similarity index 100% rename from tests/unit/core/logger/test_logging.py rename to tests/unit/test_logging.py diff --git a/tests/unit/events/test_mcp_action_observation.py b/tests/unit/test_mcp_action_observation.py similarity index 100% rename from tests/unit/events/test_mcp_action_observation.py rename to tests/unit/test_mcp_action_observation.py diff --git a/tests/unit/core/config/test_mcp_config.py b/tests/unit/test_mcp_config.py similarity index 100% rename from tests/unit/core/config/test_mcp_config.py rename to tests/unit/test_mcp_config.py diff --git a/tests/unit/mcp/test_mcp_create_clients_timeout.py b/tests/unit/test_mcp_create_clients_timeout.py similarity index 100% rename from tests/unit/mcp/test_mcp_create_clients_timeout.py rename to tests/unit/test_mcp_create_clients_timeout.py diff --git a/tests/unit/mcp/test_mcp_error_collector.py b/tests/unit/test_mcp_error_collector.py similarity index 100% rename from tests/unit/mcp/test_mcp_error_collector.py rename to tests/unit/test_mcp_error_collector.py diff --git a/tests/unit/mcp/test_mcp_integration.py b/tests/unit/test_mcp_integration.py similarity index 100% rename from tests/unit/mcp/test_mcp_integration.py rename to tests/unit/test_mcp_integration.py diff --git a/tests/unit/server/routes/test_mcp_routes.py b/tests/unit/test_mcp_routes.py similarity index 100% rename from tests/unit/server/routes/test_mcp_routes.py rename to tests/unit/test_mcp_routes.py diff --git a/tests/unit/core/config/test_mcp_settings_merge.py b/tests/unit/test_mcp_settings_merge.py similarity index 100% rename from tests/unit/core/config/test_mcp_settings_merge.py rename to tests/unit/test_mcp_settings_merge.py diff --git a/tests/unit/mcp/test_mcp_timeout.py b/tests/unit/test_mcp_timeout.py similarity index 100% rename from tests/unit/mcp/test_mcp_timeout.py rename to tests/unit/test_mcp_timeout.py diff --git a/tests/unit/mcp/test_mcp_tool_timeout_stall.py b/tests/unit/test_mcp_tool_timeout_stall.py similarity index 100% rename from tests/unit/mcp/test_mcp_tool_timeout_stall.py rename to tests/unit/test_mcp_tool_timeout_stall.py diff --git a/tests/unit/mcp/test_mcp_utils.py b/tests/unit/test_mcp_utils.py similarity index 100% rename from tests/unit/mcp/test_mcp_utils.py rename to tests/unit/test_mcp_utils.py diff --git a/tests/unit/memory/test_memory.py b/tests/unit/test_memory.py similarity index 100% rename from tests/unit/memory/test_memory.py rename to tests/unit/test_memory.py diff --git a/tests/unit/core/message/test_message_serialization.py b/tests/unit/test_message_serialization.py similarity index 100% rename from tests/unit/core/message/test_message_serialization.py rename to tests/unit/test_message_serialization.py diff --git a/tests/unit/core/message/test_message_utils.py b/tests/unit/test_message_utils.py similarity index 100% rename from tests/unit/core/message/test_message_utils.py rename to tests/unit/test_message_utils.py diff --git a/tests/unit/microagent/test_microagent_no_header.py b/tests/unit/test_microagent_no_header.py similarity index 100% rename from tests/unit/microagent/test_microagent_no_header.py rename to tests/unit/test_microagent_no_header.py diff --git a/tests/unit/microagent/test_microagent_utils.py b/tests/unit/test_microagent_utils.py similarity index 100% rename from tests/unit/microagent/test_microagent_utils.py rename to tests/unit/test_microagent_utils.py diff --git a/tests/unit/server/test_middleware.py b/tests/unit/test_middleware.py similarity index 100% rename from tests/unit/server/test_middleware.py rename to tests/unit/test_middleware.py diff --git a/tests/unit/events/test_nested_event_store.py b/tests/unit/test_nested_event_store.py similarity index 100% rename from tests/unit/events/test_nested_event_store.py rename to tests/unit/test_nested_event_store.py diff --git a/tests/unit/events/test_observation_serialization.py b/tests/unit/test_observation_serialization.py similarity index 100% rename from tests/unit/events/test_observation_serialization.py rename to tests/unit/test_observation_serialization.py diff --git a/tests/unit/server/test_openapi_schema_generation.py b/tests/unit/test_openapi_schema_generation.py similarity index 100% rename from tests/unit/server/test_openapi_schema_generation.py rename to tests/unit/test_openapi_schema_generation.py diff --git a/tests/unit/resolver/test_patch_whitespace.py b/tests/unit/test_patch_whitespace.py similarity index 100% rename from tests/unit/resolver/test_patch_whitespace.py rename to tests/unit/test_patch_whitespace.py diff --git a/tests/unit/agenthub/test_prompt_caching.py b/tests/unit/test_prompt_caching.py similarity index 100% rename from tests/unit/agenthub/test_prompt_caching.py rename to tests/unit/test_prompt_caching.py diff --git a/tests/unit/utils/test_prompt_manager.py b/tests/unit/test_prompt_manager.py similarity index 100% rename from tests/unit/utils/test_prompt_manager.py rename to tests/unit/test_prompt_manager.py diff --git a/tests/unit/integrations/test_provider_immutability.py b/tests/unit/test_provider_immutability.py similarity index 100% rename from tests/unit/integrations/test_provider_immutability.py rename to tests/unit/test_provider_immutability.py diff --git a/tests/unit/runtime/builder/test_runtime_build.py b/tests/unit/test_runtime_build.py similarity index 100% rename from tests/unit/runtime/builder/test_runtime_build.py rename to tests/unit/test_runtime_build.py diff --git a/tests/unit/runtime/test_runtime_git_tokens.py b/tests/unit/test_runtime_git_tokens.py similarity index 100% rename from tests/unit/runtime/test_runtime_git_tokens.py rename to tests/unit/test_runtime_git_tokens.py diff --git a/tests/unit/runtime/test_runtime_gitlab_microagents.py b/tests/unit/test_runtime_gitlab_microagents.py similarity index 100% rename from tests/unit/runtime/test_runtime_gitlab_microagents.py rename to tests/unit/test_runtime_gitlab_microagents.py diff --git a/tests/unit/runtime/test_runtime_import_robustness.py b/tests/unit/test_runtime_import_robustness.py similarity index 100% rename from tests/unit/runtime/test_runtime_import_robustness.py rename to tests/unit/test_runtime_import_robustness.py diff --git a/tests/unit/runtime/test_runtime_reboot.py b/tests/unit/test_runtime_reboot.py similarity index 100% rename from tests/unit/runtime/test_runtime_reboot.py rename to tests/unit/test_runtime_reboot.py diff --git a/tests/unit/utils/test_search_utils.py b/tests/unit/test_search_utils.py similarity index 100% rename from tests/unit/utils/test_search_utils.py rename to tests/unit/test_search_utils.py diff --git a/tests/unit/storage/data_models/test_secret_store.py b/tests/unit/test_secret_store.py similarity index 100% rename from tests/unit/storage/data_models/test_secret_store.py rename to tests/unit/test_secret_store.py diff --git a/tests/unit/server/routes/test_secrets_api.py b/tests/unit/test_secrets_api.py similarity index 100% rename from tests/unit/server/routes/test_secrets_api.py rename to tests/unit/test_secrets_api.py diff --git a/tests/unit/security/test_security.py b/tests/unit/test_security.py similarity index 100% rename from tests/unit/security/test_security.py rename to tests/unit/test_security.py diff --git a/tests/unit/server/session/test_session.py b/tests/unit/test_session.py similarity index 100% rename from tests/unit/server/session/test_session.py rename to tests/unit/test_session.py diff --git a/tests/unit/storage/data_models/test_settings.py b/tests/unit/test_settings.py similarity index 100% rename from tests/unit/storage/data_models/test_settings.py rename to tests/unit/test_settings.py diff --git a/tests/unit/server/routes/test_settings_api.py b/tests/unit/test_settings_api.py similarity index 100% rename from tests/unit/server/routes/test_settings_api.py rename to tests/unit/test_settings_api.py diff --git a/tests/unit/server/routes/test_settings_store_functions.py b/tests/unit/test_settings_store_functions.py similarity index 100% rename from tests/unit/server/routes/test_settings_store_functions.py rename to tests/unit/test_settings_store_functions.py diff --git a/tests/unit/runtime/test_setup.py b/tests/unit/test_setup.py similarity index 100% rename from tests/unit/runtime/test_setup.py rename to tests/unit/test_setup.py diff --git a/tests/unit/utils/test_shutdown_listener.py b/tests/unit/test_shutdown_listener.py similarity index 100% rename from tests/unit/utils/test_shutdown_listener.py rename to tests/unit/test_shutdown_listener.py diff --git a/tests/unit/server/test_socket_events.py b/tests/unit/test_socket_events.py similarity index 100% rename from tests/unit/server/test_socket_events.py rename to tests/unit/test_socket_events.py diff --git a/tests/unit/server/conversation_manager/test_standalone_conversation_manager.py b/tests/unit/test_standalone_conversation_manager.py similarity index 100% rename from tests/unit/server/conversation_manager/test_standalone_conversation_manager.py rename to tests/unit/test_standalone_conversation_manager.py diff --git a/tests/unit/controller/state/test_state.py b/tests/unit/test_state.py similarity index 100% rename from tests/unit/controller/state/test_state.py rename to tests/unit/test_state.py diff --git a/tests/unit/storage/test_storage.py b/tests/unit/test_storage.py similarity index 100% rename from tests/unit/storage/test_storage.py rename to tests/unit/test_storage.py diff --git a/tests/unit/integrations/github/test_suggested_tasks.py b/tests/unit/test_suggested_tasks.py similarity index 100% rename from tests/unit/integrations/github/test_suggested_tasks.py rename to tests/unit/test_suggested_tasks.py diff --git a/tests/unit/microagent/test_user_microagents.py b/tests/unit/test_user_microagents.py similarity index 100% rename from tests/unit/microagent/test_user_microagents.py rename to tests/unit/test_user_microagents.py diff --git a/tests/unit/memory/test_view.py b/tests/unit/test_view.py similarity index 100% rename from tests/unit/memory/test_view.py rename to tests/unit/test_view.py diff --git a/tests/unit/runtime/utils/test_windows_bash.py b/tests/unit/test_windows_bash.py similarity index 100% rename from tests/unit/runtime/utils/test_windows_bash.py rename to tests/unit/test_windows_bash.py diff --git a/tests/unit/agenthub/test_windows_prompt_refinement.py b/tests/unit/test_windows_prompt_refinement.py similarity index 100% rename from tests/unit/agenthub/test_windows_prompt_refinement.py rename to tests/unit/test_windows_prompt_refinement.py