-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from jamescooke/remove-doctest
Remove doctest
- Loading branch information
Showing
8 changed files
with
52 additions
and
34 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
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,19 @@ | ||
import pytest | ||
|
||
from flake8_aaa.helpers import first_non_blank_char | ||
|
||
|
||
@pytest.mark.parametrize( | ||
'line, char_index', | ||
[ | ||
# Empty string has no non-blank chars. | ||
('', 0), | ||
# First char after whitespace or tabs works. | ||
(' return', 4), | ||
(' return', 8), | ||
] | ||
) | ||
def test(line, char_index): | ||
result = first_non_blank_char(line) | ||
|
||
assert result == char_index |
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,20 @@ | ||
import pytest | ||
|
||
from flake8_aaa.helpers import is_test_file | ||
|
||
|
||
@pytest.mark.parametrize( | ||
'path, expected_result', | ||
[ | ||
# Non-test files give False. | ||
('./test.py', False), | ||
('./helper.py', False), | ||
('tests/conftest.py', False), | ||
# Finds files that start with 'test_' to be test files. | ||
('./test_helpers.py', True), | ||
] | ||
) | ||
def test(path, expected_result): | ||
result = is_test_file(path) | ||
|
||
assert result is expected_result |
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
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