From c1bde8e0a2de06bdcdf97687dfdc271ac2abd8eb Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 9 Nov 2018 01:37:51 +0100 Subject: [PATCH] minor: check bool before function call --- src/_pytest/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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