Add 'node_modules' to norecursedirs

Fixes #8023.
This commit is contained in:
Adam Johnson 2020-11-11 01:41:25 +00:00
parent e986d84466
commit 39b2706f6a
3 changed files with 14 additions and 2 deletions

View File

@ -0,0 +1 @@
Added ``'node_modules'`` to default value for ``norecursedirs``.

View File

@ -1541,7 +1541,8 @@ passed multiple times. The expected format is ``name=value``. For example::
[seq] matches any character in seq
[!seq] matches any char not in seq
Default patterns are ``'.*', 'build', 'dist', 'CVS', '_darcs', '{arch}', '*.egg', 'venv'``.
Default patterns are ``'*.egg'``, ``'.*'``, ``'_darcs'``, ``'build'``,
``'CVS'``, ``'dist'``, ``'node_modules'``, ``'venv'``, ``'{arch}'``.
Setting a ``norecursedirs`` replaces the default. Here is an example of
how to avoid certain directories:

View File

@ -53,7 +53,17 @@ def pytest_addoption(parser: Parser) -> None:
"norecursedirs",
"directory patterns to avoid for recursion",
type="args",
default=[".*", "build", "dist", "CVS", "_darcs", "{arch}", "*.egg", "venv"],
default=[
"*.egg",
".*",
"_darcs",
"build",
"CVS",
"dist",
"node_modules",
"venv",
"{arch}",
],
)
parser.addini(
"testpaths",