Allow disabling of python plugin
Fixes https://github.com/pytest-dev/pytest/issues/5277.
This commit is contained in:
@@ -60,7 +60,10 @@ class AssertionRewritingHook(object):
|
||||
|
||||
def __init__(self, config):
|
||||
self.config = config
|
||||
self.fnpats = config.getini("python_files")
|
||||
try:
|
||||
self.fnpats = config.getini("python_files")
|
||||
except ValueError:
|
||||
self.fnpats = ["test_*.py", "*_test.py"]
|
||||
self.session = None
|
||||
self.modules = {}
|
||||
self._rewritten_names = set()
|
||||
|
||||
Reference in New Issue
Block a user