diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 16:40:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 16:40:52 +0000 |
commit | 2e6343172d4291d0db75730b8d9ba5b39682b37a (patch) | |
tree | 807ba6b833bac746c6bf1d5c7bc71540c1592675 /tests/tutil.py | |
parent | Adding debian version 0.1.36. (diff) | |
download | debputy-2e6343172d4291d0db75730b8d9ba5b39682b37a.tar.xz debputy-2e6343172d4291d0db75730b8d9ba5b39682b37a.zip |
Merging upstream version 0.1.37.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/tutil.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/tutil.py b/tests/tutil.py index 9b622b9..9c98d09 100644 --- a/tests/tutil.py +++ b/tests/tutil.py @@ -1,4 +1,6 @@ -from typing import Tuple, Mapping +import pytest + +from typing import Tuple, Mapping, Any from debian.deb822 import Deb822 from debian.debian_support import DpkgArchTable @@ -8,6 +10,7 @@ from debputy.architecture_support import ( DpkgArchitectureBuildProcessValuesTable, ) from debputy.packages import BinaryPackage +from debputy.plugin.api.test_api import DEBPUTY_TEST_AGAINST_INSTALLED_PLUGINS _DPKG_ARCHITECTURE_TABLE_NATIVE_AMD64 = None _DPKG_ARCH_QUERY_TABLE = None @@ -64,3 +67,10 @@ def _arch_data_tables_loaded() -> ( # TODO: Make a faked table instead, so we do not have data dependencies in the test. _DPKG_ARCH_QUERY_TABLE = DpkgArchTable.load_arch_table() return _DPKG_ARCHITECTURE_TABLE_NATIVE_AMD64, _DPKG_ARCH_QUERY_TABLE + + +def build_time_only(func: Any) -> Any: + return pytest.mark.skipif( + DEBPUTY_TEST_AGAINST_INSTALLED_PLUGINS, + reason="Test makes assumptions only valid during build time tests", + )(func) |