From 34c3034b959ff2b839f17a7cbf998f95aca5ff58 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 8 May 2019 20:02:21 +0900 Subject: test/frontend/fetch.py: Test for crashes when loading junctions in non-strict mode This is a regression test for #1018 --- tests/frontend/fetch.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/frontend/fetch.py b/tests/frontend/fetch.py index e330cd407..9e7a55ad9 100644 --- a/tests/frontend/fetch.py +++ b/tests/frontend/fetch.py @@ -79,8 +79,9 @@ def test_fetch_consistency_bug(cli, datafiles): @pytest.mark.datafiles(DATA_DIR) +@pytest.mark.parametrize("strict", [True, False], ids=["strict", "no-strict"]) @pytest.mark.parametrize("ref_storage", [('inline'), ('project.refs')]) -def test_unfetched_junction(cli, tmpdir, datafiles, ref_storage): +def test_unfetched_junction(cli, tmpdir, datafiles, strict, ref_storage): project = str(datafiles) subproject_path = os.path.join(project, 'files', 'sub-project') junction_path = os.path.join(project, 'elements', 'junction.bst') @@ -89,6 +90,13 @@ def test_unfetched_junction(cli, tmpdir, datafiles, ref_storage): configure_project(project, { 'ref-storage': ref_storage }) + cli.configure({ + 'projects': { + 'test': { + 'strict': strict + } + } + }) # Create a repo to hold the subproject and generate a junction element for it ref = generate_junction(tmpdir, subproject_path, junction_path, store_ref=(ref_storage == 'inline')) -- cgit v1.2.1