-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
702167d
commit 14519c9
Showing
1 changed file
with
7 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,26 +40,26 @@ def test_fail_tools(self): | |
|
||
def test_lint_default(self): | ||
with self._isolate_repo("single_tool"): | ||
self._check_exit_code(["lint", "--skip", "citations"]) | ||
self._check_exit_code(["lint", "--skip", "CitationsMissing"]) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
bernt-matthias
Author
Contributor
|
||
with self._isolate_repo("single_tool"): | ||
self._check_exit_code(["lint"], exit_code=1) | ||
|
||
def test_lint_multiple(self): | ||
names = ["fail_citation.xml", "fail_order.xml"] | ||
paths = list(map(lambda p: os.path.join(TEST_TOOLS_DIR, p), names)) | ||
self._check_exit_code(["lint"] + paths, exit_code=1) | ||
self._check_exit_code(["lint", "--skip", "citations,xml_order"] + paths, exit_code=0) | ||
self._check_exit_code(["lint", "--skip", "CitationsMissing,XMLOrder"] + paths, exit_code=0) | ||
|
||
def test_skips(self): | ||
fail_citation = os.path.join(TEST_TOOLS_DIR, "fail_citation.xml") | ||
lint_cmd = ["lint", fail_citation] | ||
self._check_exit_code(lint_cmd, exit_code=1) | ||
|
||
lint_cmd = ["lint", "--skip", "citations", fail_citation] | ||
lint_cmd = ["lint", "--skip", "CitationsMissing", fail_citation] | ||
self._check_exit_code(lint_cmd, exit_code=0) | ||
|
||
# Check string splitting and stuff. | ||
lint_cmd = ["lint", "--skip", "xml_order, citations", fail_citation] | ||
lint_cmd = ["lint", "--skip", "XMLOrder, CitationsMissing", fail_citation] | ||
self._check_exit_code(lint_cmd, exit_code=0) | ||
|
||
# Check skip_file (containing the same skips) | ||
|
@@ -71,16 +71,16 @@ def test_recursive(self): | |
nested_dir = os.path.join(TEST_REPOS_DIR, "multi_repos_nested") | ||
|
||
# Fails to find any tools without -r. | ||
lint_cmd = ["lint", "--skip", "citations", nested_dir] | ||
lint_cmd = ["lint", "--skip", "CitationsMissing", nested_dir] | ||
self._check_exit_code(lint_cmd, exit_code=2) | ||
|
||
# Works with -r. | ||
lint_cmd = ["lint", "--skip", "citations", "-r", nested_dir] | ||
lint_cmd = ["lint", "--skip", "CitationsMissing", "-r", nested_dir] | ||
self._check_exit_code(lint_cmd, exit_code=0) | ||
|
||
def test_empty_cdata(self): | ||
empty_cdata = os.path.join(TEST_TOOLS_DIR, "empty_cdata.xml") | ||
lint_cmd = ["lint", "--skip", "citations,help", empty_cdata] | ||
lint_cmd = ["lint", "--skip", "CitationsMissing,HelpEmpty", empty_cdata] | ||
self._check_exit_code(lint_cmd, exit_code=0) | ||
|
||
def test_lint_doi(self): | ||
|
This seems like the wrong way around, existing invocations should continue to work IMO.