Skip to content

Commit da828aa

Browse files
authored
Merge pull request #2253 from The-Compiler/norecursedirs
Add venv to the default norecursedirs
2 parents 208fae5 + 91c6bef commit da828aa

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ Changes
5151
additional parameter.
5252
Thanks `@unsignedint`_ for the PR.
5353

54+
* Add ``venv`` to the default ``norecursedirs`` setting.
55+
Thanks `@The-Compiler`_ for the PR.
56+
5457

5558
.. _@davidszotten: https://github.com/davidszotten
5659
.. _@fushi: https://github.com/fushi

_pytest/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
def pytest_addoption(parser):
2929
parser.addini("norecursedirs", "directory patterns to avoid for recursion",
30-
type="args", default=['.*', 'build', 'dist', 'CVS', '_darcs', '{arch}', '*.egg'])
30+
type="args", default=['.*', 'build', 'dist', 'CVS', '_darcs', '{arch}', '*.egg', 'venv'])
3131
parser.addini("testpaths", "directories to search for tests when no files or directories are given in the command line.",
3232
type="args", default=[])
3333
#parser.addini("dirpatterns",

doc/en/customize.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Builtin configuration file options
158158
[seq] matches any character in seq
159159
[!seq] matches any char not in seq
160160

161-
Default patterns are ``'.*', 'build', 'dist', 'CVS', '_darcs', '{arch}', '*.egg'``.
161+
Default patterns are ``'.*', 'build', 'dist', 'CVS', '_darcs', '{arch}', '*.egg', 'venv'``.
162162
Setting a ``norecursedirs`` replaces the default. Here is an example of
163163
how to avoid certain directories:
164164

0 commit comments

Comments
 (0)