From cb0331a256af8e90e80f6937995fd9acad8725e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Billeter?= Date: Thu, 20 Jun 2019 13:03:31 +0200 Subject: Always fetch subprojects as needed Treat junction element sources the same as sources of any other element and always fetch subprojects as needed. Do not ask the user to manually fetch subprojects. --- tests/format/junctions.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'tests/format/junctions.py') diff --git a/tests/format/junctions.py b/tests/format/junctions.py index a85308e39..8842bc617 100644 --- a/tests/format/junctions.py +++ b/tests/format/junctions.py @@ -333,18 +333,8 @@ def test_git_show(cli, tmpdir, datafiles): } _yaml.dump(element, os.path.join(project, 'base.bst')) - # Verify that bst show does not implicitly fetch subproject - result = cli.run(project=project, args=['show', 'target.bst']) - result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.SUBPROJECT_FETCH_NEEDED) - - # Assert that we have the expected provenance encoded into the error - assert "target.bst [line 3 column 2]" in result.stderr - - # Explicitly fetch subproject - result = cli.run(project=project, args=['source', 'fetch', 'base.bst']) - result.assert_success() - - # Check that bst show succeeds now and the pipeline includes the subproject element + # Check that bst show succeeds with implicit subproject fetching and the + # pipeline includes the subproject element element_list = cli.get_pipeline(project, ['target.bst']) assert 'base.bst:target.bst' in element_list -- cgit v1.2.1