From 3989a9bb054d3b94f438c5d8d77e657ab5960ba0 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 8 Jul 2021 12:21:30 -0500 Subject: [PATCH] Docs: monkeypatch.setenv does not accept bool --- src/_pytest/monkeypatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/monkeypatch.py b/src/_pytest/monkeypatch.py index 708b25aa0..75fcdaf91 100644 --- a/src/_pytest/monkeypatch.py +++ b/src/_pytest/monkeypatch.py @@ -36,7 +36,7 @@ def monkeypatch() -> Generator["MonkeyPatch", None, None]: monkeypatch.delattr(obj, name, raising=True) monkeypatch.setitem(mapping, name, value) monkeypatch.delitem(obj, name, raising=True) - monkeypatch.setenv(name, value, prepend=False) + monkeypatch.setenv(name, value, prepend=os.pathsep) monkeypatch.delenv(name, raising=True) monkeypatch.syspath_prepend(path) monkeypatch.chdir(path)