From 222cbed1aacd24c0e51bdfa9b993f9f6bf76bcbd Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Wed, 17 Jun 2026 18:30:23 -0600 Subject: [PATCH] Move tests to tests/ This has more or less become the standard. It is also the best way for us to avoid shipping tests in the wheel, because of setuptools' behavior when using pyproject.toml. For more information, see: https://github.com/pypa/setuptools/issues/3260 Signed-off-by: Zack Cerza --- .github/workflows/ci.yml | 2 +- pyproject.toml | 7 ++----- {teuthology/test => tests}/__init__.py | 0 .../test => tests/dispatcher}/test_dispatcher.py | 0 .../dispatcher}/test_reimage_error_mark_machine_down.py | 0 .../test => tests/dispatcher}/test_supervisor.py | 0 {teuthology/test => tests}/fake_archive.py | 0 {teuthology/test => tests}/fake_fs.py | 0 {teuthology/lock/test => tests/integration}/__init__.py | 0 {teuthology/test => tests}/integration/test_suite.py | 0 {teuthology/openstack/test => tests/lock}/__init__.py | 0 {teuthology/lock/test => tests/lock}/test_lock.py | 0 {teuthology/orchestra/test => tests/openstack}/__init__.py | 0 .../test => tests/openstack}/archive-on-error.yaml | 0 {teuthology/openstack/test => tests/openstack}/noop.yaml | 0 .../test => tests/openstack}/openstack-integration.py | 0 .../openstack/test => tests/openstack}/resources_hint.yaml | 0 .../test => tests/openstack}/resources_hint_no_cinder.yaml | 0 .../openstack/test => tests/openstack}/stop_worker.yaml | 0 .../openstack/test => tests/openstack}/suites/noop/+ | 0 .../test => tests/openstack}/suites/noop/noop.yaml | 0 .../openstack/test => tests/openstack}/suites/nuke/+ | 0 .../openstack/test => tests/openstack}/test_config.py | 0 .../openstack/test => tests/openstack}/test_openstack.py | 0 .../openstack/test => tests/openstack}/user-data-test1.txt | 0 .../test/integration => tests/orchestra}/__init__.py | 0 .../orchestra}/files/daemon-systemdstate-pid-ps-ef.output | 0 .../test => tests/orchestra}/integration/__init__.py | 0 .../orchestra}/integration/test_integration.py | 0 .../orchestra/test => tests/orchestra}/test_cluster.py | 0 .../orchestra/test => tests/orchestra}/test_connection.py | 2 +- .../orchestra/test => tests/orchestra}/test_console.py | 0 .../orchestra/test => tests/orchestra}/test_opsys.py | 0 .../orchestra/test => tests/orchestra}/test_remote.py | 0 {teuthology/orchestra/test => tests/orchestra}/test_run.py | 0 .../orchestra/test => tests/orchestra}/test_systemd.py | 0 {teuthology/orchestra/test => tests/orchestra}/util.py | 0 .../cloud/test => tests/provision/cloud}/test_base.py | 0 .../test => tests/provision/cloud}/test_cloud_init.py | 0 .../test => tests/provision/cloud}/test_cloud_util.py | 0 .../cloud/test => tests/provision/cloud}/test_openstack.py | 0 .../provision/cloud}/test_openstack_userdata_conf.yaml | 0 .../provision/test => tests/provision}/test_downburst.py | 0 {teuthology/provision/test => tests/provision}/test_fog.py | 0 .../test => tests/provision}/test_init_provision.py | 0 .../provision/test => tests/provision}/test_maas.py | 0 .../provision/test => tests/provision}/test_pelagos.py | 0 {scripts/test => tests/scripts}/script.py | 0 {scripts/test => tests/scripts}/test_dispatcher_.py | 0 {scripts/test => tests/scripts}/test_exporter_.py | 0 {scripts/test => tests/scripts}/test_lock.py | 0 {scripts/test => tests/scripts}/test_ls.py | 0 {scripts/test => tests/scripts}/test_prune_logs.py | 0 {scripts/test => tests/scripts}/test_report.py | 0 {scripts/test => tests/scripts}/test_results.py | 0 {scripts/test => tests/scripts}/test_run.py | 0 {scripts/test => tests/scripts}/test_schedule.py | 0 {scripts/test => tests/scripts}/test_suite.py | 0 {scripts/test => tests/scripts}/test_supervisor_.py | 0 {scripts/test => tests/scripts}/test_updatekeys.py | 0 {teuthology/suite/test => tests/suite}/conftest.py | 0 .../suite/test => tests/suite}/suites/noop/noop.yaml | 0 .../suite/test => tests/suite}/test_build_matrix.py | 2 +- {teuthology/suite/test => tests/suite}/test_init.py | 0 {teuthology/suite/test => tests/suite}/test_matrix.py | 0 {teuthology/suite/test => tests/suite}/test_merge.py | 2 +- {teuthology/suite/test => tests/suite}/test_placeholder.py | 0 {teuthology/suite/test => tests/suite}/test_run_.py | 0 {teuthology/suite/test => tests/suite}/test_util.py | 0 {teuthology/test => tests}/task/__init__.py | 0 {teuthology/test => tests}/task/test_ansible.py | 2 +- {teuthology/test => tests}/task/test_ceph_ansible.py | 2 +- {teuthology/test => tests}/task/test_console_log.py | 2 +- {teuthology/test => tests}/task/test_install.py | 2 +- {teuthology/test => tests}/task/test_internal.py | 0 {teuthology/test => tests}/task/test_kernel.py | 0 {teuthology/test => tests}/task/test_pcp.py | 2 +- {teuthology/test => tests}/task/test_selinux.py | 0 {teuthology/test => tests}/test_config.py | 0 {teuthology/test => tests}/test_contextutil.py | 0 {teuthology/test => tests}/test_describe_tests.py | 2 +- .../test => tests}/test_email_sleep_before_teardown.py | 0 {teuthology/test => tests}/test_exit.py | 0 {teuthology/test => tests}/test_get_distro.py | 0 {teuthology/test => tests}/test_get_distro_version.py | 0 {teuthology/test => tests}/test_get_multi_machine_types.py | 0 {teuthology/test => tests}/test_imports.py | 0 {teuthology/test => tests}/test_job_status.py | 0 {teuthology/test => tests}/test_kill.py | 0 {teuthology/test => tests}/test_ls.py | 0 {teuthology/test => tests}/test_misc.py | 0 {teuthology/test => tests}/test_packaging.py | 0 {teuthology/test => tests}/test_parallel.py | 0 {teuthology/test => tests}/test_repo_utils.py | 0 {teuthology/test => tests}/test_report.py | 2 +- {teuthology/test => tests}/test_results.py | 0 {teuthology/test => tests}/test_run.py | 2 +- {teuthology/test => tests}/test_safepath.py | 0 {teuthology/test => tests}/test_schedule.py | 0 {teuthology/test => tests}/test_scrape.py | 0 {teuthology/test => tests}/test_timer.py | 0 .../test => tests}/test_vps_os_vers_parameter_checking.py | 0 .../util/test => tests/util}/files/test_unit_test.xml | 0 .../util/test => tests/util}/files/test_valgrind.xml | 0 {teuthology/util/test => tests/util}/test_scanner.py | 0 {teuthology/util/test => tests/util}/test_time.py | 0 teuthology/task/tests/__init__.py | 4 ++-- tox.ini | 2 +- 108 files changed, 17 insertions(+), 20 deletions(-) rename {teuthology/test => tests}/__init__.py (100%) rename {teuthology/dispatcher/test => tests/dispatcher}/test_dispatcher.py (100%) rename {teuthology/dispatcher/test => tests/dispatcher}/test_reimage_error_mark_machine_down.py (100%) rename {teuthology/dispatcher/test => tests/dispatcher}/test_supervisor.py (100%) rename {teuthology/test => tests}/fake_archive.py (100%) rename {teuthology/test => tests}/fake_fs.py (100%) rename {teuthology/lock/test => tests/integration}/__init__.py (100%) rename {teuthology/test => tests}/integration/test_suite.py (100%) rename {teuthology/openstack/test => tests/lock}/__init__.py (100%) rename {teuthology/lock/test => tests/lock}/test_lock.py (100%) rename {teuthology/orchestra/test => tests/openstack}/__init__.py (100%) rename {teuthology/openstack/test => tests/openstack}/archive-on-error.yaml (100%) rename {teuthology/openstack/test => tests/openstack}/noop.yaml (100%) rename {teuthology/openstack/test => tests/openstack}/openstack-integration.py (100%) rename {teuthology/openstack/test => tests/openstack}/resources_hint.yaml (100%) rename {teuthology/openstack/test => tests/openstack}/resources_hint_no_cinder.yaml (100%) rename {teuthology/openstack/test => tests/openstack}/stop_worker.yaml (100%) rename {teuthology/openstack/test => tests/openstack}/suites/noop/+ (100%) rename {teuthology/openstack/test => tests/openstack}/suites/noop/noop.yaml (100%) rename {teuthology/openstack/test => tests/openstack}/suites/nuke/+ (100%) rename {teuthology/openstack/test => tests/openstack}/test_config.py (100%) rename {teuthology/openstack/test => tests/openstack}/test_openstack.py (100%) rename {teuthology/openstack/test => tests/openstack}/user-data-test1.txt (100%) rename {teuthology/orchestra/test/integration => tests/orchestra}/__init__.py (100%) rename {teuthology/orchestra/test => tests/orchestra}/files/daemon-systemdstate-pid-ps-ef.output (100%) rename {teuthology/test => tests/orchestra}/integration/__init__.py (100%) rename {teuthology/orchestra/test => tests/orchestra}/integration/test_integration.py (100%) rename {teuthology/orchestra/test => tests/orchestra}/test_cluster.py (100%) rename {teuthology/orchestra/test => tests/orchestra}/test_connection.py (98%) rename {teuthology/orchestra/test => tests/orchestra}/test_console.py (100%) rename {teuthology/orchestra/test => tests/orchestra}/test_opsys.py (100%) rename {teuthology/orchestra/test => tests/orchestra}/test_remote.py (100%) rename {teuthology/orchestra/test => tests/orchestra}/test_run.py (100%) rename {teuthology/orchestra/test => tests/orchestra}/test_systemd.py (100%) rename {teuthology/orchestra/test => tests/orchestra}/util.py (100%) rename {teuthology/provision/cloud/test => tests/provision/cloud}/test_base.py (100%) rename {teuthology/provision/cloud/test => tests/provision/cloud}/test_cloud_init.py (100%) rename {teuthology/provision/cloud/test => tests/provision/cloud}/test_cloud_util.py (100%) rename {teuthology/provision/cloud/test => tests/provision/cloud}/test_openstack.py (100%) rename {teuthology/provision/cloud/test => tests/provision/cloud}/test_openstack_userdata_conf.yaml (100%) rename {teuthology/provision/test => tests/provision}/test_downburst.py (100%) rename {teuthology/provision/test => tests/provision}/test_fog.py (100%) rename {teuthology/provision/test => tests/provision}/test_init_provision.py (100%) rename {teuthology/provision/test => tests/provision}/test_maas.py (100%) rename {teuthology/provision/test => tests/provision}/test_pelagos.py (100%) rename {scripts/test => tests/scripts}/script.py (100%) rename {scripts/test => tests/scripts}/test_dispatcher_.py (100%) rename {scripts/test => tests/scripts}/test_exporter_.py (100%) rename {scripts/test => tests/scripts}/test_lock.py (100%) rename {scripts/test => tests/scripts}/test_ls.py (100%) rename {scripts/test => tests/scripts}/test_prune_logs.py (100%) rename {scripts/test => tests/scripts}/test_report.py (100%) rename {scripts/test => tests/scripts}/test_results.py (100%) rename {scripts/test => tests/scripts}/test_run.py (100%) rename {scripts/test => tests/scripts}/test_schedule.py (100%) rename {scripts/test => tests/scripts}/test_suite.py (100%) rename {scripts/test => tests/scripts}/test_supervisor_.py (100%) rename {scripts/test => tests/scripts}/test_updatekeys.py (100%) rename {teuthology/suite/test => tests/suite}/conftest.py (100%) rename {teuthology/suite/test => tests/suite}/suites/noop/noop.yaml (100%) rename {teuthology/suite/test => tests/suite}/test_build_matrix.py (99%) rename {teuthology/suite/test => tests/suite}/test_init.py (100%) rename {teuthology/suite/test => tests/suite}/test_matrix.py (100%) rename {teuthology/suite/test => tests/suite}/test_merge.py (99%) rename {teuthology/suite/test => tests/suite}/test_placeholder.py (100%) rename {teuthology/suite/test => tests/suite}/test_run_.py (100%) rename {teuthology/suite/test => tests/suite}/test_util.py (100%) rename {teuthology/test => tests}/task/__init__.py (100%) rename {teuthology/test => tests}/task/test_ansible.py (99%) rename {teuthology/test => tests}/task/test_ceph_ansible.py (99%) rename {teuthology/test => tests}/task/test_console_log.py (98%) rename {teuthology/test => tests}/task/test_install.py (99%) rename {teuthology/test => tests}/task/test_internal.py (100%) rename {teuthology/test => tests}/task/test_kernel.py (100%) rename {teuthology/test => tests}/task/test_pcp.py (99%) rename {teuthology/test => tests}/task/test_selinux.py (100%) rename {teuthology/test => tests}/test_config.py (100%) rename {teuthology/test => tests}/test_contextutil.py (100%) rename {teuthology/test => tests}/test_describe_tests.py (99%) rename {teuthology/test => tests}/test_email_sleep_before_teardown.py (100%) rename {teuthology/test => tests}/test_exit.py (100%) rename {teuthology/test => tests}/test_get_distro.py (100%) rename {teuthology/test => tests}/test_get_distro_version.py (100%) rename {teuthology/test => tests}/test_get_multi_machine_types.py (100%) rename {teuthology/test => tests}/test_imports.py (100%) rename {teuthology/test => tests}/test_job_status.py (100%) rename {teuthology/test => tests}/test_kill.py (100%) rename {teuthology/test => tests}/test_ls.py (100%) rename {teuthology/test => tests}/test_misc.py (100%) rename {teuthology/test => tests}/test_packaging.py (100%) rename {teuthology/test => tests}/test_parallel.py (100%) rename {teuthology/test => tests}/test_repo_utils.py (100%) rename {teuthology/test => tests}/test_report.py (98%) rename {teuthology/test => tests}/test_results.py (100%) rename {teuthology/test => tests}/test_run.py (99%) rename {teuthology/test => tests}/test_safepath.py (100%) rename {teuthology/test => tests}/test_schedule.py (100%) rename {teuthology/test => tests}/test_scrape.py (100%) rename {teuthology/test => tests}/test_timer.py (100%) rename {teuthology/test => tests}/test_vps_os_vers_parameter_checking.py (100%) rename {teuthology/util/test => tests/util}/files/test_unit_test.xml (100%) rename {teuthology/util/test => tests/util}/files/test_valgrind.xml (100%) rename {teuthology/util/test => tests/util}/test_scanner.py (100%) rename {teuthology/util/test => tests/util}/test_time.py (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f3e0f4a7..b61a2242c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,6 @@ jobs: - name: Lint run: uv tool run ruff check - name: Run tests - run: uv run --all-extras pytest teuthology scripts + run: uv run --all-extras pytest - name: Run docs build run: uv run tox -e docs diff --git a/pyproject.toml b/pyproject.toml index 6320ca3ee..163bede98 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -127,13 +127,10 @@ cache-keys = [{ file = "pyproject.toml" }, { git = { commit = true, tags = true [tool.setuptools.packages.find] exclude = [ - "*test*", + "tests*", "docs*", ] -[tool.setuptools.exclude-package-data] -"*" = ["test*"] - [tool.setuptools_scm] version_scheme = "python-simplified-semver" @@ -141,7 +138,7 @@ version_scheme = "python-simplified-semver" lint.select = ["F", "E9"] [tool.pytest] -testpaths = ["teuthology", "scripts"] +testpaths = ["tests"] norecursedirs = [".git", "build", "virtualenv", "teuthology.egg-info", ".tox", "*/integration", "teuthology/task/tests"] log_cli = true log_level = "NOTSET" diff --git a/teuthology/test/__init__.py b/tests/__init__.py similarity index 100% rename from teuthology/test/__init__.py rename to tests/__init__.py diff --git a/teuthology/dispatcher/test/test_dispatcher.py b/tests/dispatcher/test_dispatcher.py similarity index 100% rename from teuthology/dispatcher/test/test_dispatcher.py rename to tests/dispatcher/test_dispatcher.py diff --git a/teuthology/dispatcher/test/test_reimage_error_mark_machine_down.py b/tests/dispatcher/test_reimage_error_mark_machine_down.py similarity index 100% rename from teuthology/dispatcher/test/test_reimage_error_mark_machine_down.py rename to tests/dispatcher/test_reimage_error_mark_machine_down.py diff --git a/teuthology/dispatcher/test/test_supervisor.py b/tests/dispatcher/test_supervisor.py similarity index 100% rename from teuthology/dispatcher/test/test_supervisor.py rename to tests/dispatcher/test_supervisor.py diff --git a/teuthology/test/fake_archive.py b/tests/fake_archive.py similarity index 100% rename from teuthology/test/fake_archive.py rename to tests/fake_archive.py diff --git a/teuthology/test/fake_fs.py b/tests/fake_fs.py similarity index 100% rename from teuthology/test/fake_fs.py rename to tests/fake_fs.py diff --git a/teuthology/lock/test/__init__.py b/tests/integration/__init__.py similarity index 100% rename from teuthology/lock/test/__init__.py rename to tests/integration/__init__.py diff --git a/teuthology/test/integration/test_suite.py b/tests/integration/test_suite.py similarity index 100% rename from teuthology/test/integration/test_suite.py rename to tests/integration/test_suite.py diff --git a/teuthology/openstack/test/__init__.py b/tests/lock/__init__.py similarity index 100% rename from teuthology/openstack/test/__init__.py rename to tests/lock/__init__.py diff --git a/teuthology/lock/test/test_lock.py b/tests/lock/test_lock.py similarity index 100% rename from teuthology/lock/test/test_lock.py rename to tests/lock/test_lock.py diff --git a/teuthology/orchestra/test/__init__.py b/tests/openstack/__init__.py similarity index 100% rename from teuthology/orchestra/test/__init__.py rename to tests/openstack/__init__.py diff --git a/teuthology/openstack/test/archive-on-error.yaml b/tests/openstack/archive-on-error.yaml similarity index 100% rename from teuthology/openstack/test/archive-on-error.yaml rename to tests/openstack/archive-on-error.yaml diff --git a/teuthology/openstack/test/noop.yaml b/tests/openstack/noop.yaml similarity index 100% rename from teuthology/openstack/test/noop.yaml rename to tests/openstack/noop.yaml diff --git a/teuthology/openstack/test/openstack-integration.py b/tests/openstack/openstack-integration.py similarity index 100% rename from teuthology/openstack/test/openstack-integration.py rename to tests/openstack/openstack-integration.py diff --git a/teuthology/openstack/test/resources_hint.yaml b/tests/openstack/resources_hint.yaml similarity index 100% rename from teuthology/openstack/test/resources_hint.yaml rename to tests/openstack/resources_hint.yaml diff --git a/teuthology/openstack/test/resources_hint_no_cinder.yaml b/tests/openstack/resources_hint_no_cinder.yaml similarity index 100% rename from teuthology/openstack/test/resources_hint_no_cinder.yaml rename to tests/openstack/resources_hint_no_cinder.yaml diff --git a/teuthology/openstack/test/stop_worker.yaml b/tests/openstack/stop_worker.yaml similarity index 100% rename from teuthology/openstack/test/stop_worker.yaml rename to tests/openstack/stop_worker.yaml diff --git a/teuthology/openstack/test/suites/noop/+ b/tests/openstack/suites/noop/+ similarity index 100% rename from teuthology/openstack/test/suites/noop/+ rename to tests/openstack/suites/noop/+ diff --git a/teuthology/openstack/test/suites/noop/noop.yaml b/tests/openstack/suites/noop/noop.yaml similarity index 100% rename from teuthology/openstack/test/suites/noop/noop.yaml rename to tests/openstack/suites/noop/noop.yaml diff --git a/teuthology/openstack/test/suites/nuke/+ b/tests/openstack/suites/nuke/+ similarity index 100% rename from teuthology/openstack/test/suites/nuke/+ rename to tests/openstack/suites/nuke/+ diff --git a/teuthology/openstack/test/test_config.py b/tests/openstack/test_config.py similarity index 100% rename from teuthology/openstack/test/test_config.py rename to tests/openstack/test_config.py diff --git a/teuthology/openstack/test/test_openstack.py b/tests/openstack/test_openstack.py similarity index 100% rename from teuthology/openstack/test/test_openstack.py rename to tests/openstack/test_openstack.py diff --git a/teuthology/openstack/test/user-data-test1.txt b/tests/openstack/user-data-test1.txt similarity index 100% rename from teuthology/openstack/test/user-data-test1.txt rename to tests/openstack/user-data-test1.txt diff --git a/teuthology/orchestra/test/integration/__init__.py b/tests/orchestra/__init__.py similarity index 100% rename from teuthology/orchestra/test/integration/__init__.py rename to tests/orchestra/__init__.py diff --git a/teuthology/orchestra/test/files/daemon-systemdstate-pid-ps-ef.output b/tests/orchestra/files/daemon-systemdstate-pid-ps-ef.output similarity index 100% rename from teuthology/orchestra/test/files/daemon-systemdstate-pid-ps-ef.output rename to tests/orchestra/files/daemon-systemdstate-pid-ps-ef.output diff --git a/teuthology/test/integration/__init__.py b/tests/orchestra/integration/__init__.py similarity index 100% rename from teuthology/test/integration/__init__.py rename to tests/orchestra/integration/__init__.py diff --git a/teuthology/orchestra/test/integration/test_integration.py b/tests/orchestra/integration/test_integration.py similarity index 100% rename from teuthology/orchestra/test/integration/test_integration.py rename to tests/orchestra/integration/test_integration.py diff --git a/teuthology/orchestra/test/test_cluster.py b/tests/orchestra/test_cluster.py similarity index 100% rename from teuthology/orchestra/test/test_cluster.py rename to tests/orchestra/test_cluster.py diff --git a/teuthology/orchestra/test/test_connection.py b/tests/orchestra/test_connection.py similarity index 98% rename from teuthology/orchestra/test/test_connection.py rename to tests/orchestra/test_connection.py index b9f7296aa..8051d572d 100644 --- a/teuthology/orchestra/test/test_connection.py +++ b/tests/orchestra/test_connection.py @@ -2,7 +2,7 @@ from mock import patch, Mock from teuthology import config from teuthology.orchestra import connection -from teuthology.orchestra.test.util import assert_raises +from tests.orchestra.util import assert_raises class TestConnection(object): diff --git a/teuthology/orchestra/test/test_console.py b/tests/orchestra/test_console.py similarity index 100% rename from teuthology/orchestra/test/test_console.py rename to tests/orchestra/test_console.py diff --git a/teuthology/orchestra/test/test_opsys.py b/tests/orchestra/test_opsys.py similarity index 100% rename from teuthology/orchestra/test/test_opsys.py rename to tests/orchestra/test_opsys.py diff --git a/teuthology/orchestra/test/test_remote.py b/tests/orchestra/test_remote.py similarity index 100% rename from teuthology/orchestra/test/test_remote.py rename to tests/orchestra/test_remote.py diff --git a/teuthology/orchestra/test/test_run.py b/tests/orchestra/test_run.py similarity index 100% rename from teuthology/orchestra/test/test_run.py rename to tests/orchestra/test_run.py diff --git a/teuthology/orchestra/test/test_systemd.py b/tests/orchestra/test_systemd.py similarity index 100% rename from teuthology/orchestra/test/test_systemd.py rename to tests/orchestra/test_systemd.py diff --git a/teuthology/orchestra/test/util.py b/tests/orchestra/util.py similarity index 100% rename from teuthology/orchestra/test/util.py rename to tests/orchestra/util.py diff --git a/teuthology/provision/cloud/test/test_base.py b/tests/provision/cloud/test_base.py similarity index 100% rename from teuthology/provision/cloud/test/test_base.py rename to tests/provision/cloud/test_base.py diff --git a/teuthology/provision/cloud/test/test_cloud_init.py b/tests/provision/cloud/test_cloud_init.py similarity index 100% rename from teuthology/provision/cloud/test/test_cloud_init.py rename to tests/provision/cloud/test_cloud_init.py diff --git a/teuthology/provision/cloud/test/test_cloud_util.py b/tests/provision/cloud/test_cloud_util.py similarity index 100% rename from teuthology/provision/cloud/test/test_cloud_util.py rename to tests/provision/cloud/test_cloud_util.py diff --git a/teuthology/provision/cloud/test/test_openstack.py b/tests/provision/cloud/test_openstack.py similarity index 100% rename from teuthology/provision/cloud/test/test_openstack.py rename to tests/provision/cloud/test_openstack.py diff --git a/teuthology/provision/cloud/test/test_openstack_userdata_conf.yaml b/tests/provision/cloud/test_openstack_userdata_conf.yaml similarity index 100% rename from teuthology/provision/cloud/test/test_openstack_userdata_conf.yaml rename to tests/provision/cloud/test_openstack_userdata_conf.yaml diff --git a/teuthology/provision/test/test_downburst.py b/tests/provision/test_downburst.py similarity index 100% rename from teuthology/provision/test/test_downburst.py rename to tests/provision/test_downburst.py diff --git a/teuthology/provision/test/test_fog.py b/tests/provision/test_fog.py similarity index 100% rename from teuthology/provision/test/test_fog.py rename to tests/provision/test_fog.py diff --git a/teuthology/provision/test/test_init_provision.py b/tests/provision/test_init_provision.py similarity index 100% rename from teuthology/provision/test/test_init_provision.py rename to tests/provision/test_init_provision.py diff --git a/teuthology/provision/test/test_maas.py b/tests/provision/test_maas.py similarity index 100% rename from teuthology/provision/test/test_maas.py rename to tests/provision/test_maas.py diff --git a/teuthology/provision/test/test_pelagos.py b/tests/provision/test_pelagos.py similarity index 100% rename from teuthology/provision/test/test_pelagos.py rename to tests/provision/test_pelagos.py diff --git a/scripts/test/script.py b/tests/scripts/script.py similarity index 100% rename from scripts/test/script.py rename to tests/scripts/script.py diff --git a/scripts/test/test_dispatcher_.py b/tests/scripts/test_dispatcher_.py similarity index 100% rename from scripts/test/test_dispatcher_.py rename to tests/scripts/test_dispatcher_.py diff --git a/scripts/test/test_exporter_.py b/tests/scripts/test_exporter_.py similarity index 100% rename from scripts/test/test_exporter_.py rename to tests/scripts/test_exporter_.py diff --git a/scripts/test/test_lock.py b/tests/scripts/test_lock.py similarity index 100% rename from scripts/test/test_lock.py rename to tests/scripts/test_lock.py diff --git a/scripts/test/test_ls.py b/tests/scripts/test_ls.py similarity index 100% rename from scripts/test/test_ls.py rename to tests/scripts/test_ls.py diff --git a/scripts/test/test_prune_logs.py b/tests/scripts/test_prune_logs.py similarity index 100% rename from scripts/test/test_prune_logs.py rename to tests/scripts/test_prune_logs.py diff --git a/scripts/test/test_report.py b/tests/scripts/test_report.py similarity index 100% rename from scripts/test/test_report.py rename to tests/scripts/test_report.py diff --git a/scripts/test/test_results.py b/tests/scripts/test_results.py similarity index 100% rename from scripts/test/test_results.py rename to tests/scripts/test_results.py diff --git a/scripts/test/test_run.py b/tests/scripts/test_run.py similarity index 100% rename from scripts/test/test_run.py rename to tests/scripts/test_run.py diff --git a/scripts/test/test_schedule.py b/tests/scripts/test_schedule.py similarity index 100% rename from scripts/test/test_schedule.py rename to tests/scripts/test_schedule.py diff --git a/scripts/test/test_suite.py b/tests/scripts/test_suite.py similarity index 100% rename from scripts/test/test_suite.py rename to tests/scripts/test_suite.py diff --git a/scripts/test/test_supervisor_.py b/tests/scripts/test_supervisor_.py similarity index 100% rename from scripts/test/test_supervisor_.py rename to tests/scripts/test_supervisor_.py diff --git a/scripts/test/test_updatekeys.py b/tests/scripts/test_updatekeys.py similarity index 100% rename from scripts/test/test_updatekeys.py rename to tests/scripts/test_updatekeys.py diff --git a/teuthology/suite/test/conftest.py b/tests/suite/conftest.py similarity index 100% rename from teuthology/suite/test/conftest.py rename to tests/suite/conftest.py diff --git a/teuthology/suite/test/suites/noop/noop.yaml b/tests/suite/suites/noop/noop.yaml similarity index 100% rename from teuthology/suite/test/suites/noop/noop.yaml rename to tests/suite/suites/noop/noop.yaml diff --git a/teuthology/suite/test/test_build_matrix.py b/tests/suite/test_build_matrix.py similarity index 99% rename from teuthology/suite/test/test_build_matrix.py rename to tests/suite/test_build_matrix.py index ad710d2ef..895c91eac 100644 --- a/teuthology/suite/test/test_build_matrix.py +++ b/tests/suite/test_build_matrix.py @@ -4,7 +4,7 @@ import random from mock import patch, MagicMock from teuthology.suite import build_matrix -from teuthology.test.fake_fs import make_fake_fstools +from tests.fake_fs import make_fake_fstools class TestBuildMatrixSimple(object): diff --git a/teuthology/suite/test/test_init.py b/tests/suite/test_init.py similarity index 100% rename from teuthology/suite/test/test_init.py rename to tests/suite/test_init.py diff --git a/teuthology/suite/test/test_matrix.py b/tests/suite/test_matrix.py similarity index 100% rename from teuthology/suite/test/test_matrix.py rename to tests/suite/test_matrix.py diff --git a/teuthology/suite/test/test_merge.py b/tests/suite/test_merge.py similarity index 99% rename from teuthology/suite/test/test_merge.py rename to tests/suite/test_merge.py index 82a0bb67b..6ed3890a2 100644 --- a/teuthology/suite/test/test_merge.py +++ b/tests/suite/test_merge.py @@ -5,7 +5,7 @@ from mock import patch, MagicMock from teuthology.suite import build_matrix from teuthology.suite.merge import config_merge -from teuthology.test.fake_fs import make_fake_fstools +from tests.fake_fs import make_fake_fstools log = logging.getLogger(__name__) diff --git a/teuthology/suite/test/test_placeholder.py b/tests/suite/test_placeholder.py similarity index 100% rename from teuthology/suite/test/test_placeholder.py rename to tests/suite/test_placeholder.py diff --git a/teuthology/suite/test/test_run_.py b/tests/suite/test_run_.py similarity index 100% rename from teuthology/suite/test/test_run_.py rename to tests/suite/test_run_.py diff --git a/teuthology/suite/test/test_util.py b/tests/suite/test_util.py similarity index 100% rename from teuthology/suite/test/test_util.py rename to tests/suite/test_util.py diff --git a/teuthology/test/task/__init__.py b/tests/task/__init__.py similarity index 100% rename from teuthology/test/task/__init__.py rename to tests/task/__init__.py diff --git a/teuthology/test/task/test_ansible.py b/tests/task/test_ansible.py similarity index 99% rename from teuthology/test/task/test_ansible.py rename to tests/task/test_ansible.py index 1b7afc01d..7f4839c76 100644 --- a/teuthology/test/task/test_ansible.py +++ b/tests/task/test_ansible.py @@ -17,7 +17,7 @@ from teuthology.orchestra.remote import Remote from teuthology.task import ansible from teuthology.task.ansible import Ansible, CephLab, FailureAnalyzer -from teuthology.test.task import TestTask +from tests.task import TestTask class TestFailureAnalyzer: diff --git a/teuthology/test/task/test_ceph_ansible.py b/tests/task/test_ceph_ansible.py similarity index 99% rename from teuthology/test/task/test_ceph_ansible.py rename to tests/task/test_ceph_ansible.py index 29359c102..239eee7c7 100644 --- a/teuthology/test/task/test_ceph_ansible.py +++ b/tests/task/test_ceph_ansible.py @@ -12,7 +12,7 @@ from teuthology.orchestra.remote import Remote from teuthology.task import ceph_ansible from teuthology.task.ceph_ansible import CephAnsible -from teuthology.test.task import TestTask +from tests.task import TestTask SKIP_IRRELEVANT = "Not relevant to this subclass" diff --git a/teuthology/test/task/test_console_log.py b/tests/task/test_console_log.py similarity index 98% rename from teuthology/test/task/test_console_log.py rename to tests/task/test_console_log.py index e2ad6981e..42be217b9 100644 --- a/teuthology/test/task/test_console_log.py +++ b/tests/task/test_console_log.py @@ -8,7 +8,7 @@ from teuthology.orchestra.cluster import Cluster from teuthology.orchestra.remote import Remote from teuthology.task.console_log import ConsoleLog -from teuthology.test.task import TestTask +from tests.task import TestTask class TestConsoleLog(TestTask): diff --git a/teuthology/test/task/test_install.py b/tests/task/test_install.py similarity index 99% rename from teuthology/test/task/test_install.py rename to tests/task/test_install.py index 1bbb5015c..b5fc5a807 100644 --- a/teuthology/test/task/test_install.py +++ b/tests/task/test_install.py @@ -13,7 +13,7 @@ class TestInstall(object): def _get_default_package_list(self, project='ceph', debug=False): path = os.path.join( os.path.dirname(__file__), - '..', '..', 'task', 'install', 'packages.yaml', + '..', '..', 'teuthology', 'task', 'install', 'packages.yaml', ) pkgs = yaml.safe_load(open(path))[project] if not debug: diff --git a/teuthology/test/task/test_internal.py b/tests/task/test_internal.py similarity index 100% rename from teuthology/test/task/test_internal.py rename to tests/task/test_internal.py diff --git a/teuthology/test/task/test_kernel.py b/tests/task/test_kernel.py similarity index 100% rename from teuthology/test/task/test_kernel.py rename to tests/task/test_kernel.py diff --git a/teuthology/test/task/test_pcp.py b/tests/task/test_pcp.py similarity index 99% rename from teuthology/test/task/test_pcp.py rename to tests/task/test_pcp.py index 777740779..424083aca 100644 --- a/teuthology/test/task/test_pcp.py +++ b/tests/task/test_pcp.py @@ -13,7 +13,7 @@ from teuthology.orchestra.run import Raw from teuthology.task.pcp import (PCPDataSource, PCPArchive, PCPGrapher, GrafanaGrapher, GraphiteGrapher, PCP) -from teuthology.test.task import TestTask +from tests.task import TestTask pcp_host = 'http://pcp.front.sepia.ceph.com:44323/' diff --git a/teuthology/test/task/test_selinux.py b/tests/task/test_selinux.py similarity index 100% rename from teuthology/test/task/test_selinux.py rename to tests/task/test_selinux.py diff --git a/teuthology/test/test_config.py b/tests/test_config.py similarity index 100% rename from teuthology/test/test_config.py rename to tests/test_config.py diff --git a/teuthology/test/test_contextutil.py b/tests/test_contextutil.py similarity index 100% rename from teuthology/test/test_contextutil.py rename to tests/test_contextutil.py diff --git a/teuthology/test/test_describe_tests.py b/tests/test_describe_tests.py similarity index 99% rename from teuthology/test/test_describe_tests.py rename to tests/test_describe_tests.py index 13635531d..2292f2852 100644 --- a/teuthology/test/test_describe_tests.py +++ b/tests/test_describe_tests.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import pytest -from teuthology.test.fake_fs import make_fake_fstools +from tests.fake_fs import make_fake_fstools from teuthology.describe_tests import (tree_with_info, extract_info, get_combinations) from teuthology.exceptions import ParseError diff --git a/teuthology/test/test_email_sleep_before_teardown.py b/tests/test_email_sleep_before_teardown.py similarity index 100% rename from teuthology/test/test_email_sleep_before_teardown.py rename to tests/test_email_sleep_before_teardown.py diff --git a/teuthology/test/test_exit.py b/tests/test_exit.py similarity index 100% rename from teuthology/test/test_exit.py rename to tests/test_exit.py diff --git a/teuthology/test/test_get_distro.py b/tests/test_get_distro.py similarity index 100% rename from teuthology/test/test_get_distro.py rename to tests/test_get_distro.py diff --git a/teuthology/test/test_get_distro_version.py b/tests/test_get_distro_version.py similarity index 100% rename from teuthology/test/test_get_distro_version.py rename to tests/test_get_distro_version.py diff --git a/teuthology/test/test_get_multi_machine_types.py b/tests/test_get_multi_machine_types.py similarity index 100% rename from teuthology/test/test_get_multi_machine_types.py rename to tests/test_get_multi_machine_types.py diff --git a/teuthology/test/test_imports.py b/tests/test_imports.py similarity index 100% rename from teuthology/test/test_imports.py rename to tests/test_imports.py diff --git a/teuthology/test/test_job_status.py b/tests/test_job_status.py similarity index 100% rename from teuthology/test/test_job_status.py rename to tests/test_job_status.py diff --git a/teuthology/test/test_kill.py b/tests/test_kill.py similarity index 100% rename from teuthology/test/test_kill.py rename to tests/test_kill.py diff --git a/teuthology/test/test_ls.py b/tests/test_ls.py similarity index 100% rename from teuthology/test/test_ls.py rename to tests/test_ls.py diff --git a/teuthology/test/test_misc.py b/tests/test_misc.py similarity index 100% rename from teuthology/test/test_misc.py rename to tests/test_misc.py diff --git a/teuthology/test/test_packaging.py b/tests/test_packaging.py similarity index 100% rename from teuthology/test/test_packaging.py rename to tests/test_packaging.py diff --git a/teuthology/test/test_parallel.py b/tests/test_parallel.py similarity index 100% rename from teuthology/test/test_parallel.py rename to tests/test_parallel.py diff --git a/teuthology/test/test_repo_utils.py b/tests/test_repo_utils.py similarity index 100% rename from teuthology/test/test_repo_utils.py rename to tests/test_repo_utils.py diff --git a/teuthology/test/test_report.py b/tests/test_report.py similarity index 98% rename from teuthology/test/test_report.py rename to tests/test_report.py index a8535dfc8..bd407540b 100644 --- a/teuthology/test/test_report.py +++ b/tests/test_report.py @@ -2,7 +2,7 @@ import json import pytest import yaml -from teuthology.test import fake_archive +from tests import fake_archive from teuthology import report diff --git a/teuthology/test/test_results.py b/tests/test_results.py similarity index 100% rename from teuthology/test/test_results.py rename to tests/test_results.py diff --git a/teuthology/test/test_run.py b/tests/test_run.py similarity index 99% rename from teuthology/test/test_run.py rename to tests/test_run.py index 50a9e2258..7ca40d2cc 100644 --- a/teuthology/test/test_run.py +++ b/tests/test_run.py @@ -6,7 +6,7 @@ from unittest.mock import patch, call from teuthology import run from scripts import run as scripts_run -from teuthology.test import skipif_teuthology_process +from tests import skipif_teuthology_process class TestRun(object): diff --git a/teuthology/test/test_safepath.py b/tests/test_safepath.py similarity index 100% rename from teuthology/test/test_safepath.py rename to tests/test_safepath.py diff --git a/teuthology/test/test_schedule.py b/tests/test_schedule.py similarity index 100% rename from teuthology/test/test_schedule.py rename to tests/test_schedule.py diff --git a/teuthology/test/test_scrape.py b/tests/test_scrape.py similarity index 100% rename from teuthology/test/test_scrape.py rename to tests/test_scrape.py diff --git a/teuthology/test/test_timer.py b/tests/test_timer.py similarity index 100% rename from teuthology/test/test_timer.py rename to tests/test_timer.py diff --git a/teuthology/test/test_vps_os_vers_parameter_checking.py b/tests/test_vps_os_vers_parameter_checking.py similarity index 100% rename from teuthology/test/test_vps_os_vers_parameter_checking.py rename to tests/test_vps_os_vers_parameter_checking.py diff --git a/teuthology/util/test/files/test_unit_test.xml b/tests/util/files/test_unit_test.xml similarity index 100% rename from teuthology/util/test/files/test_unit_test.xml rename to tests/util/files/test_unit_test.xml diff --git a/teuthology/util/test/files/test_valgrind.xml b/tests/util/files/test_valgrind.xml similarity index 100% rename from teuthology/util/test/files/test_valgrind.xml rename to tests/util/files/test_valgrind.xml diff --git a/teuthology/util/test/test_scanner.py b/tests/util/test_scanner.py similarity index 100% rename from teuthology/util/test/test_scanner.py rename to tests/util/test_scanner.py diff --git a/teuthology/util/test/test_time.py b/tests/util/test_time.py similarity index 100% rename from teuthology/util/test/test_time.py rename to tests/util/test_time.py diff --git a/teuthology/task/tests/__init__.py b/teuthology/task/tests/__init__.py index b558341cf..0773a266d 100644 --- a/teuthology/task/tests/__init__.py +++ b/teuthology/task/tests/__init__.py @@ -137,7 +137,7 @@ class Tests(Task): super().end() def run_cli(self): - pytest_args = self.base_args + ['./teuthology/test', './scripts'] + pytest_args = self.base_args + ['./tests/'] if len(self.cluster.remotes): pytest_args.append('./teuthology/task/tests') self.log.info(f"pytest args: {pytest_args}") @@ -153,7 +153,7 @@ class Tests(Task): return status, [] def run_py(self): - pytest_args = self.base_args + ['--pyargs', 'teuthology', 'scripts'] + pytest_args = self.base_args + ['--pyargs', './tests/'] if len(self.cluster.remotes): pytest_args.append(__name__) self.log.info(f"pytest args: {pytest_args}") diff --git a/tox.ini b/tox.ini index 09ab4cfa0..3d4bc6248 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ passenv = HOME extras = test log_format = %(asctime)s %(levelname)s %(message)s commands = - python -m pytest --cov=teuthology --cov-report=term -v {posargs:teuthology scripts} + python -m pytest --cov=teuthology --cov-report=term -v {posargs:./tests} [testenv:docs] changedir = docs -- 2.47.3