Skip to content

Commit d973cf0

Browse files
committed
Fix the test
1 parent f3c8138 commit d973cf0

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

Lib/test/_test_multiprocessing.py

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7369,20 +7369,7 @@ def test_that_shared_memory_name_with_colons_has_no_resource_tracker_errors(self
73697369
print("SUCCESS")
73707370
""")
73717371

7372-
# Run the test script as a subprocess to capture all output
7373-
result = subprocess.run(
7374-
[sys.executable, '-c', test_script],
7375-
capture_output=True,
7376-
text=True
7377-
)
7378-
7379-
self.assertEqual(result.returncode, 0,
7380-
f"Script failed with stderr: {result.stderr}")
7381-
self.assertIn("SUCCESS", result.stdout)
7382-
7383-
stderr_lower = result.stderr.lower()
7384-
self.assertNotIn("too many values to unpack", stderr_lower,
7385-
f"Resource tracker parsing error found in stderr: {result.stderr}")
7386-
7387-
self.assertNotIn("valueerror", stderr_lower,
7388-
f"ValueError found in stderr: {result.stderr}")
7372+
rc, out, err = assert_python_ok("-c", test_script)
7373+
self.assertIn(b"SUCCESS", out)
7374+
self.assertNotIn(b"traceback", err.lower(), err)
7375+
self.assertNotIn(b"resource_tracker.py", err, err)

0 commit comments

Comments
 (0)