-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error message on missing root links
- Loading branch information
1 parent
c33a64e
commit 9a0d0d3
Showing
2 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import pytest | ||
|
||
from komodo.symlink.sanity_check import assert_root_nodes | ||
|
||
|
||
def test_assert_root_nodes_error_message(): | ||
link_dict = { | ||
"links": { | ||
"stable": "2012.01", | ||
"testing": "2012.03", | ||
"missing_root_1": "2011.12", | ||
"missing_root_2": "2011.11", | ||
"missing_root_3": "2011.10", | ||
}, | ||
"root_links": ["stable", "testing"], | ||
} | ||
|
||
with pytest.raises( | ||
AssertionError, | ||
match=r"Missing root\(s\): {(?=.*missing_root_1)(?=.*missing_root_2)(?=.*missing_root_3)", | ||
): | ||
assert_root_nodes(link_dict) |