Add venv to the default norecursedirs
venv (without a dot) is commonly used as a name for a virtualenv directory, and we don't want to collect that.
This commit is contained in:
parent
208fae5bf0
commit
91c6bef77a
|
@ -51,6 +51,9 @@ Changes
|
||||||
additional parameter.
|
additional parameter.
|
||||||
Thanks `@unsignedint`_ for the PR.
|
Thanks `@unsignedint`_ for the PR.
|
||||||
|
|
||||||
|
* Add ``venv`` to the default ``norecursedirs`` setting.
|
||||||
|
Thanks `@The-Compiler`_ for the PR.
|
||||||
|
|
||||||
|
|
||||||
.. _@davidszotten: https://github.com/davidszotten
|
.. _@davidszotten: https://github.com/davidszotten
|
||||||
.. _@fushi: https://github.com/fushi
|
.. _@fushi: https://github.com/fushi
|
||||||
|
|
|
@ -27,7 +27,7 @@ EXIT_NOTESTSCOLLECTED = 5
|
||||||
|
|
||||||
def pytest_addoption(parser):
|
def pytest_addoption(parser):
|
||||||
parser.addini("norecursedirs", "directory patterns to avoid for recursion",
|
parser.addini("norecursedirs", "directory patterns to avoid for recursion",
|
||||||
type="args", default=['.*', 'build', 'dist', 'CVS', '_darcs', '{arch}', '*.egg'])
|
type="args", default=['.*', 'build', 'dist', 'CVS', '_darcs', '{arch}', '*.egg', 'venv'])
|
||||||
parser.addini("testpaths", "directories to search for tests when no files or directories are given in the command line.",
|
parser.addini("testpaths", "directories to search for tests when no files or directories are given in the command line.",
|
||||||
type="args", default=[])
|
type="args", default=[])
|
||||||
#parser.addini("dirpatterns",
|
#parser.addini("dirpatterns",
|
||||||
|
|
|
@ -158,7 +158,7 @@ Builtin configuration file options
|
||||||
[seq] matches any character in seq
|
[seq] matches any character in seq
|
||||||
[!seq] matches any char not in seq
|
[!seq] matches any char not in seq
|
||||||
|
|
||||||
Default patterns are ``'.*', 'build', 'dist', 'CVS', '_darcs', '{arch}', '*.egg'``.
|
Default patterns are ``'.*', 'build', 'dist', 'CVS', '_darcs', '{arch}', '*.egg', 'venv'``.
|
||||||
Setting a ``norecursedirs`` replaces the default. Here is an example of
|
Setting a ``norecursedirs`` replaces the default. Here is an example of
|
||||||
how to avoid certain directories:
|
how to avoid certain directories:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue