From 5dd2158db10bcf5f1eb7ad40a6b0c3ae8934e241 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Sun, 7 Jan 2024 11:00:32 +0100 Subject: [PATCH] test subprocess: do an iterative sleep --- psutil/tests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py index df30e30698..6196e422dc 100644 --- a/psutil/tests/__init__.py +++ b/psutil/tests/__init__.py @@ -377,7 +377,7 @@ def spawn_testproc(cmd=None, **kwds): pyline = ( "from time import sleep;" + "open(r'%s', 'w').close();" % testfn - + "sleep(60);" + + "[sleep(0.1) for x in range(100)];" # 10 secs ) cmd = [PYTHON_EXE, "-c", pyline] sproc = subprocess.Popen(cmd, **kwds)