Merge pull request #2253 from The-Compiler/norecursedirs

Add venv to the default norecursedirs
This commit is contained in:
Bruno Oliveira 2017-02-15 18:40:38 -02:00 committed by GitHub
commit da828aac05
3 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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",

View File

@ -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: