summaryrefslogtreecommitdiffstats
path: root/tests/tutil.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 16:40:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 16:40:52 +0000
commitede5a1f9cb549d56ff1f3b2a3f5437d13bd14444 (patch)
tree4cdbdc6bb5e78080f2c0a6e049b2146afeebd362 /tests/tutil.py
parentAdding upstream version 0.1.36. (diff)
downloaddebputy-ede5a1f9cb549d56ff1f3b2a3f5437d13bd14444.tar.xz
debputy-ede5a1f9cb549d56ff1f3b2a3f5437d13bd14444.zip
Adding upstream version 0.1.37.upstream/0.1.37
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/tutil.py12
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)