Skip to content

Commit

Permalink
Exempt asyncSetUp and asyncTearDown, just like setUp and tearDown
Browse files Browse the repository at this point in the history
These are new in Python 3.8's unittest.IsolatedAsyncioTestCase.
  • Loading branch information
geofft committed Jul 3, 2021
1 parent 2db856d commit 5d3654b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The following flake8 options are added:

Currently, this option can only be used for N802, N803, N804, N805, N806, N815, and N816 errors.

Default: ``setUp,tearDown,setUpClass,tearDownClass,setUpTestData,failureException,longMessage,maxDiff``.
Default: ``setUp,tearDown,setUpClass,tearDownClass,asyncSetUp,asyncTearDown,setUpTestData,failureException,longMessage,maxDiff``.

--classmethod-decorators List of method decorators pep8-naming plugin should consider class method.

Expand Down
2 changes: 2 additions & 0 deletions src/pep8ext_naming.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ class _FunctionType(object):
'tearDown',
'setUpClass',
'tearDownClass',
'asyncSetUp',
'asyncTearDown',
'setUpTestData',
'failureException',
'longMessage',
Expand Down
4 changes: 4 additions & 0 deletions testsuite/N802.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,9 @@ def setUpClass(self):
pass
def tearDownClass(self):
pass
def asyncSetUp(self):
pass
def asyncTearDown(self):
pass
def setUpTestData(self):
pass

0 comments on commit 5d3654b

Please sign in to comment.