From 4251991c3aacca24a70ddb1bf71ae25a4f24403a Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 28 Dec 2025 23:33:04 +0000 Subject: [PATCH] tests: Handle builtin _ssl module on Linux --- tests/fork_test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/fork_test.py b/tests/fork_test.py index 35acfe13..0c446855 100644 --- a/tests/fork_test.py +++ b/tests/fork_test.py @@ -27,8 +27,12 @@ import plain_old_module def _find_ssl_linux(): + ssl_object_path = getattr(_ssl, "__file__", None) + if ssl_object_path is None: + # No __file__ because it's builtin + ssl_object_path = sys.executable proc = subprocess.Popen( - ['ldd', _ssl.__file__], + ['ldd', ssl_object_path], stdout=subprocess.PIPE, stderr=subprocess.PIPE, ) b_stdout, b_stderr = proc.communicate()