This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The compatibility test is currently failing from what looks like an error with flake8. (It is unable to process files in a nested directory when `--enable-extensions=TRUE` is passed to it.) Also, add poetry config.
- Loading branch information
1 parent
9018557
commit 53054cd
Showing
5 changed files
with
477 additions
and
12 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"""Tests for compatibility with other flake8 plugins.""" | ||
|
||
import subprocess | ||
from unittest import TestCase | ||
|
||
# Regression introduced by flake8 in 3.3.0 | ||
# Bad: 3.3.0 | ||
|
||
class CompatibilityTest(TestCase): | ||
|
||
def test_flake8_docstrings(self): | ||
proc = subprocess.run([ | ||
'flake8', | ||
'--isolated', | ||
'--enable-extensions=TRUE', | ||
'integration_tests/files/example-ascii.py', | ||
], stdout=subprocess.PIPE | ||
) | ||
result = proc.stdout.decode('utf8') | ||
print(result) | ||
|
||
self.assertTrue( | ||
'D401' in result, | ||
'The file should contain an error from flake8-docstrings.', | ||
) | ||
self.assertTrue( | ||
'RST399' in result, | ||
'The file should contain an error from flake8-rst-docstrings', | ||
) | ||
self.assertTrue( | ||
'DAR101' in result, | ||
'The file should contain an error from darglint.', | ||
) |
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,16 @@ | ||
|
||
def problematic_function(arg1): | ||
"""Returns double the value of the first argument. | ||
Args: | ||
a: The first argument. | ||
Returns: | ||
Two times the value of the first argument. | ||
""" | ||
return arg1 * 2 | ||
|
||
|
||
def problematic_rst(): | ||
"""""" |
Oops, something went wrong.