Skip to content
Snippets Groups Projects
Commit 7e7244fa authored by Phillip Smyth's avatar Phillip Smyth
Browse files

Added Tests

tests/frontend/show.py: Added test
tests/frontend/invalid_element_path/project.conf: Added test project.conf
parent 4f8263a7
No related branches found
No related tags found
No related merge requests found
Pipeline #35732410 failed
# Project config for frontend build test
name: test
elephant-path: elements
......@@ -36,6 +36,26 @@ def test_show(cli, datafiles, target, format, expected):
.format(expected, result.output))
@pytest.mark.datafiles(os.path.join(
os.path.dirname(os.path.realpath(__file__)),
"invalid_element_path",
))
@pytest.mark.parametrize("target,format,expected", [
('import-bin.bst', '%{name}', 'import-bin.bst'),
('import-bin.bst', '%{state}', 'buildable'),
('compose-all.bst', '%{state}', 'waiting')
])
def test_show_invalid_element_path(cli, datafiles, target, format, expected):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, silent=True, args=[
'show',
'--deps', 'none',
'--format', format,
target])
result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.INVALID_DATA)
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.parametrize("target,except_,expected", [
('target.bst', 'import-bin.bst', ['import-dev.bst', 'compose-all.bst', 'target.bst']),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment