summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/loader/dependencies.py11
-rw-r--r--tests/loader/dependencies/elements/invalidstrict.bst9
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/loader/dependencies.py b/tests/loader/dependencies.py
index cb750fcb1..1a8365259 100644
--- a/tests/loader/dependencies.py
+++ b/tests/loader/dependencies.py
@@ -124,6 +124,17 @@ def test_invalid_dependency_type(datafiles):
@pytest.mark.datafiles(DATA_DIR)
+def test_invalid_strict_dependency(cli, datafiles):
+ basedir = os.path.join(datafiles.dirname, datafiles.basename)
+ loader = make_loader(basedir)
+
+ with pytest.raises(LoadError) as exc:
+ element = loader.load(['elements/invalidstrict.bst'])[0]
+
+ assert (exc.value.reason == LoadErrorReason.INVALID_DATA)
+
+
+@pytest.mark.datafiles(DATA_DIR)
def test_build_dependency(datafiles):
basedir = os.path.join(datafiles.dirname, datafiles.basename)
loader = make_loader(basedir)
diff --git a/tests/loader/dependencies/elements/invalidstrict.bst b/tests/loader/dependencies/elements/invalidstrict.bst
new file mode 100644
index 000000000..8893b4aa9
--- /dev/null
+++ b/tests/loader/dependencies/elements/invalidstrict.bst
@@ -0,0 +1,9 @@
+kind: manual
+description: |
+
+ This is an invalid strict dependency because runtime
+ dependencies cannot be strict.
+
+runtime-depends:
+- filename: firstdep.bst
+ strict: true