From 8b52ab618198ec721db69fab8f4f9d428a555981 Mon Sep 17 00:00:00 2001 From: Buck Evan Date: Thu, 18 Jan 2024 16:52:03 -0600 Subject: [PATCH] delete silly chdir This line causes the below insane behavior. I hypothesize that it's here for no really good reason. https://gist.github.com/bukzor/085b1c2bdaa5bc6033db50d718c48bd3 --- src/_pytest/main.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/_pytest/main.py b/src/_pytest/main.py index f7e47cece..0e0331be5 100644 --- a/src/_pytest/main.py +++ b/src/_pytest/main.py @@ -300,7 +300,6 @@ def wrap_session( finally: # Explicitly break reference cycle. excinfo = None # type: ignore - os.chdir(session.startpath) if initstate >= 2: try: config.hook.pytest_sessionfinish(