diff --git a/pmb/aportgen/test_device.py b/test/aportgen/test_device.py similarity index 97% rename from pmb/aportgen/test_device.py rename to test/aportgen/test_device.py index 34d5f506..6005072d 100644 --- a/pmb/aportgen/test_device.py +++ b/test/aportgen/test_device.py @@ -4,7 +4,7 @@ from pmb.types import Bootimg import pytest -from .device import generate_deviceinfo_fastboot_content +from pmb.aportgen.device import generate_deviceinfo_fastboot_content # Test case name -> (input, expected substrings, !expected substrings) test_data: dict[str, tuple[Bootimg | None, list[str], list[str]]] = { diff --git a/pmb/chroot/test_apk.py b/test/chroot/test_apk.py similarity index 98% rename from pmb/chroot/test_apk.py rename to test/chroot/test_apk.py index 17f54524..3df02691 100644 --- a/pmb/chroot/test_apk.py +++ b/test/chroot/test_apk.py @@ -9,7 +9,7 @@ from pmb.core.arch import Arch from pmb.core.context import get_context from pmb.parse.apkindex import ApkindexBlock -from .apk import packages_get_locally_built_apks +from pmb.chroot.apk import packages_get_locally_built_apks import pmb.config.pmaports diff --git a/pmb/config/test_config_serde.py b/test/config/test_config_serde.py similarity index 100% rename from pmb/config/test_config_serde.py rename to test/config/test_config_serde.py diff --git a/pmb/conftest.py b/test/conftest.py similarity index 100% rename from pmb/conftest.py rename to test/conftest.py diff --git a/pmb/core/test_arch.py b/test/core/test_arch.py similarity index 98% rename from pmb/core/test_arch.py rename to test/core/test_arch.py index 7709d0b9..f81bf411 100644 --- a/pmb/core/test_arch.py +++ b/test/core/test_arch.py @@ -6,7 +6,7 @@ from pathlib import Path from typing import Any import pytest -from .arch import Arch +from pmb.core.arch import Arch def test_valid_arches(): diff --git a/pmb/core/test_chroot.py b/test/core/test_chroot.py similarity index 95% rename from pmb/core/test_chroot.py rename to test/core/test_chroot.py index 82970dc3..93d66c8e 100644 --- a/pmb/core/test_chroot.py +++ b/test/core/test_chroot.py @@ -3,9 +3,9 @@ import pytest -from .arch import Arch -from .context import get_context -from .chroot import Chroot, ChrootType +from pmb.core.arch import Arch +from pmb.core.context import get_context +from pmb.core.chroot import Chroot, ChrootType def test_valid_chroots(pmb_args, mock_devices_find_path): diff --git a/pmb/core/test_pkgrepo.py b/test/core/test_pkgrepo.py similarity index 100% rename from pmb/core/test_pkgrepo.py rename to test/core/test_pkgrepo.py diff --git a/pmb/data/tests/APKBUILD.qemu-amd64 b/test/data/tests/APKBUILD.qemu-amd64 similarity index 100% rename from pmb/data/tests/APKBUILD.qemu-amd64 rename to test/data/tests/APKBUILD.qemu-amd64 diff --git a/pmb/data/tests/deviceinfo.qemu-amd64 b/test/data/tests/deviceinfo.qemu-amd64 similarity index 100% rename from pmb/data/tests/deviceinfo.qemu-amd64 rename to test/data/tests/deviceinfo.qemu-amd64 diff --git a/pmb/data/tests/pmbootstrap_v3.cfg b/test/data/tests/pmbootstrap_v3.cfg similarity index 100% rename from pmb/data/tests/pmbootstrap_v3.cfg rename to test/data/tests/pmbootstrap_v3.cfg diff --git a/pmb/helpers/test_locale.py b/test/helpers/test_locale.py similarity index 100% rename from pmb/helpers/test_locale.py rename to test/helpers/test_locale.py diff --git a/pmb/meta/test_cache.py b/test/meta/test_cache.py similarity index 98% rename from pmb/meta/test_cache.py rename to test/meta/test_cache.py index 43945656..b09fa915 100644 --- a/pmb/meta/test_cache.py +++ b/test/meta/test_cache.py @@ -1,7 +1,7 @@ # Copyright 2024 Caleb Connolly # SPDX-License-Identifier: GPL-3.0-or-later -from . import Cache, Wrapper +from pmb.meta import Cache, Wrapper def test_cache_hits_basic(): diff --git a/pmb/parse/test_apkindex.py b/test/parse/test_apkindex.py similarity index 99% rename from pmb/parse/test_apkindex.py rename to test/parse/test_apkindex.py index c6768be3..732dae00 100644 --- a/pmb/parse/test_apkindex.py +++ b/test/parse/test_apkindex.py @@ -7,7 +7,7 @@ import pytest import pmb.parse.apkindex -from .apkindex import parse as parse_apkindex, clear_cache as clear_apkindex_cache +from pmb.parse.apkindex import parse as parse_apkindex, clear_cache as clear_apkindex_cache example_apkindex = """ C:Q1p+nGf5oBAmbU9FQvV4MhfEmWqVE= diff --git a/pmb/parse/test_bootimg.py b/test/parse/test_bootimg.py similarity index 98% rename from pmb/parse/test_bootimg.py rename to test/parse/test_bootimg.py index 9b0c4b28..6fbc0f43 100644 --- a/pmb/parse/test_bootimg.py +++ b/test/parse/test_bootimg.py @@ -9,7 +9,7 @@ import subprocess from pmb.types import Bootimg -from .bootimg import bootimg as parse_bootimg +from pmb.parse.bootimg import bootimg as parse_bootimg """ diff --git a/pmb/parse/test_deviceinfo.py b/test/parse/test_deviceinfo.py similarity index 99% rename from pmb/parse/test_deviceinfo.py rename to test/parse/test_deviceinfo.py index bf63295b..84c32d56 100644 --- a/pmb/parse/test_deviceinfo.py +++ b/test/parse/test_deviceinfo.py @@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later from pathlib import Path -from .deviceinfo import Deviceinfo +from pmb.parse.deviceinfo import Deviceinfo from pmb.config import deviceinfo_chassis_types import pytest diff --git a/pmb/parse/test_version.py b/test/parse/test_version.py similarity index 94% rename from pmb/parse/test_version.py rename to test/parse/test_version.py index 092a3d7e..fa254b6d 100644 --- a/pmb/parse/test_version.py +++ b/test/parse/test_version.py @@ -1,6 +1,6 @@ # Copyright 2024 Stefan Hansson # SPDX-License-Identifier: GPL-3.0-or-later -from .version import check_string, compare, get_token, parse_suffix, validate, Token +from pmb.parse.version import check_string, compare, get_token, parse_suffix, validate, Token def test_check_string() -> None: