-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: raise min python to 3.6.7 * ci(lint-test): update actions * chore: lint * test: fix for windows path resolution was not padding slashes enough on windows in illegal-chars * chore: update test suite and dependencies note the removal of futures in this commit. this removes the need for #1353 but it was necessary to clear setuptools legacy.
- Loading branch information
1 parent
56d4772
commit 629af47
Showing
9 changed files
with
1,029 additions
and
916 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -1,26 +1,26 @@ | ||
"""Check that the CLI can handle invalid characters.""" | ||
|
||
from os.path import abspath, dirname, join | ||
from pathlib import Path | ||
|
||
from click.testing import CliRunner | ||
|
||
from proselint.command_line import proselint | ||
|
||
from .check import Check | ||
|
||
CHAR_FILE = Path(__file__, "../invalid-chars.txt").resolve() | ||
|
||
|
||
class TestInvalidCharacters(Check): | ||
"""Test class for testing invalid characters on the CLI""" | ||
|
||
__test__ = True | ||
|
||
def test_invalid_characters(self): | ||
"""Ensure that a file with illegal characters does not break us.""" | ||
curr_dir = dirname(abspath(__file__)) | ||
test_file = join(curr_dir, "illegal-chars.txt") | ||
"""Ensure that invalid characters do not break proselint.""" | ||
runner = CliRunner() | ||
|
||
output = runner.invoke(proselint, test_file) | ||
output = runner.invoke(proselint, CHAR_FILE) | ||
|
||
assert "UnicodeDecodeError" not in output.stdout | ||
assert "FileNotFoundError" not in output.stdout |
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