From bc41c57a118fcc8d4932d3046b1475e4a05b58ae Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Sat, 4 Jul 2026 23:51:32 +0300 Subject: [PATCH] Tests on remote rhel-8 (py3.6.8) are fixed - test_get_process_children__with_child - test_get_process_children__with_three_children - do not call subprocess.Popen with text=True. Python 3.6.8 does not support it. - test_get_process_children__with_child - a garbage is deleted --- tests/test_os_ops_common.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/test_os_ops_common.py b/tests/test_os_ops_common.py index 764f3a2..cd0191a 100644 --- a/tests/test_os_ops_common.py +++ b/tests/test_os_ops_common.py @@ -2465,7 +2465,7 @@ def test_get_process_children__with_child( script = ( "import time, os, subprocess; " "s = str(os.getpid()); " - "p = subprocess.Popen('exec sleep 60', shell=True, stdout=subprocess.PIPE, text=True); " + "p = subprocess.Popen('exec sleep 60', shell=True, stdout=subprocess.PIPE); " "s += ':' + str(p.pid); " "print(s, flush=True); " "time.sleep(60)" @@ -2480,7 +2480,6 @@ def test_get_process_children__with_child( assert isinstance(p1, subprocess.Popen) assert p1.stdout is not None - p1.pid line = p1.stdout.readline() assert line is not None @@ -2526,9 +2525,9 @@ def test_get_process_children__with_three_children( script = ( "import time, os, subprocess; " "s = str(os.getpid()); " - "p1 = subprocess.Popen('exec sleep 60', shell=True, stdout=subprocess.PIPE, text=True); " - "p2 = subprocess.Popen('exec sleep 60', shell=True, stdout=subprocess.PIPE, text=True); " - "p3 = subprocess.Popen('exec sleep 60', shell=True, stdout=subprocess.PIPE, text=True); " + "p1 = subprocess.Popen('exec sleep 60', shell=True, stdout=subprocess.PIPE); " + "p2 = subprocess.Popen('exec sleep 60', shell=True, stdout=subprocess.PIPE); " + "p3 = subprocess.Popen('exec sleep 60', shell=True, stdout=subprocess.PIPE); " "s += ':' + str(p1.pid) + ':' + str(p2.pid) + ':' + str(p3.pid); " "print(s, flush=True); " "time.sleep(60)"