From fe37841f07d5bdc2a922e51443710ea119fdb35a Mon Sep 17 00:00:00 2001 From: Jib Date: Wed, 7 Feb 2024 14:24:20 -0500 Subject: [PATCH] PYTHON-4147-fix: Remove quote wrapping and remove shell=true usage (#1513) --- test/test_monitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_monitor.py b/test/test_monitor.py index 8ccec7fd0b..92bcdc49ad 100644 --- a/test/test_monitor.py +++ b/test/test_monitor.py @@ -83,9 +83,9 @@ def test_cleanup_executors_on_client_close(self): def test_no_thread_start_runtime_err_on_shutdown(self): """Test we silence noisy runtime errors fired when the MongoClient spawns a new thread on process shutdown.""" - command = [sys.executable, "-c", "'from pymongo import MongoClient; c = MongoClient()'"] + command = [sys.executable, "-c", "from pymongo import MongoClient; c = MongoClient()"] completed_process: subprocess.CompletedProcess = subprocess.run( - " ".join(command), shell=True, capture_output=True + command, capture_output=True ) self.assertFalse(completed_process.stderr)