forked from galaxyproject/galaxy-release-util
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If there were more than one sets of brackets, the value was replaced by an empty string
- Loading branch information
Showing
2 changed files
with
16 additions
and
1 deletion.
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,15 @@ | ||
from galaxy_release_util.metadata import strip_release | ||
|
||
|
||
def test_strip_release(): | ||
"""Verify that the first occurance of [*] is stripped out.""" | ||
assert strip_release("foo") == "foo" | ||
assert strip_release("[1]foo") == "foo" | ||
assert strip_release("[1.2.3]foo") == "foo" | ||
assert strip_release("[]foo") == "foo" | ||
assert strip_release("[][]foo") == "[]foo" | ||
assert strip_release("foo[]") == "foo[]" | ||
assert strip_release("[]foo[]") == "foo[]" | ||
assert strip_release("foo[bar]") == "foo[bar]" | ||
assert strip_release("foo[]baz") == "foo[]baz" | ||
assert strip_release("foo[bar]baz") == "foo[bar]baz" |