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 | 8b8344c3982326d9c9b99e7bca8e667746b77691 (patch) | |
tree | a16bb8a7cbd05b1cdf5085afe13e74b3d15ce4e2 /tests/tutil.py | |
parent | Releasing progress-linux version 0.1.36-0.0~progress7.99u1. (diff) | |
download | debputy-8b8344c3982326d9c9b99e7bca8e667746b77691.tar.xz debputy-8b8344c3982326d9c9b99e7bca8e667746b77691.zip |
Merging upstream version 0.1.37.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/tutil.py')
-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) |