From abd025f78eead2e7f3c397f88424f6270672cd40 Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Mon, 23 Feb 2026 15:34:56 +0500 Subject: [PATCH] Pass correct env to PopenSpawn() in tests. (#7279) --- tests/test_crawler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_crawler.py b/tests/test_crawler.py index ba33d0bbe..9ade8472f 100644 --- a/tests/test_crawler.py +++ b/tests/test_crawler.py @@ -951,7 +951,7 @@ class TestCrawlerProcessSubprocessBase(ScriptRunnerMixin): def test_shutdown_graceful(self): sig = signal.SIGINT if sys.platform != "win32" else signal.SIGBREAK args = self.get_script_args("sleeping.py", "3") - p = PopenSpawn(args, timeout=5) + p = PopenSpawn(args, timeout=5, env=get_script_run_env()) p.expect_exact("Spider opened") p.expect_exact("Crawled (200)") p.kill(sig) @@ -963,7 +963,7 @@ class TestCrawlerProcessSubprocessBase(ScriptRunnerMixin): def test_shutdown_forced(self): sig = signal.SIGINT if sys.platform != "win32" else signal.SIGBREAK args = self.get_script_args("sleeping.py", "10") - p = PopenSpawn(args, timeout=5) + p = PopenSpawn(args, timeout=5, env=get_script_run_env()) p.expect_exact("Spider opened") p.expect_exact("Crawled (200)") p.kill(sig)