From f289a72531491b2ea34ac53ea3354c18e967232b Mon Sep 17 00:00:00 2001 From: Geoffrey Thomas Date: Sat, 3 Jul 2021 18:08:46 -0400 Subject: [PATCH] Exempt asyncSetUp and asyncTearDown, just like setUp and tearDown (#170) --- README.rst | 2 +- src/pep8ext_naming.py | 2 ++ testsuite/N802.py | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index f3f009c..a207bde 100644 --- a/README.rst +++ b/README.rst @@ -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. diff --git a/src/pep8ext_naming.py b/src/pep8ext_naming.py index 2037435..fb2ebf8 100644 --- a/src/pep8ext_naming.py +++ b/src/pep8ext_naming.py @@ -107,6 +107,8 @@ class _FunctionType(object): 'tearDown', 'setUpClass', 'tearDownClass', + 'asyncSetUp', + 'asyncTearDown', 'setUpTestData', 'failureException', 'longMessage', diff --git a/testsuite/N802.py b/testsuite/N802.py index d6093ae..406bed9 100644 --- a/testsuite/N802.py +++ b/testsuite/N802.py @@ -70,5 +70,9 @@ def setUpClass(self): pass def tearDownClass(self): pass + def asyncSetUp(self): + pass + def asyncTearDown(self): + pass def setUpTestData(self): pass