summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2018-11-09 01:37:51 +0100
committerDaniel Hahler <git@thequod.de>2018-11-09 01:37:51 +0100
commitc1bde8e0a2de06bdcdf97687dfdc271ac2abd8eb (patch)
tree1432fec990179596d86dfce333ca98c2f701884b
parent560c055b090c2cc951c687728ee84353126a53ab (diff)
downloadpytest-c1bde8e0a2de06bdcdf97687dfdc271ac2abd8eb.tar.gz
minor: check bool before function call
-rw-r--r--src/_pytest/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/_pytest/main.py b/src/_pytest/main.py
index 5b9a94998..910812419 100644
--- a/src/_pytest/main.py
+++ b/src/_pytest/main.py
@@ -278,7 +278,7 @@ def pytest_ignore_collect(path, config):
return True
allow_in_venv = config.getoption("collect_in_virtualenv")
- if _in_venv(path) and not allow_in_venv:
+ if not allow_in_venv and _in_venv(path):
return True
return False