Skip to content

Commit

Permalink
[3.12] pythongh-122334: Fix test_embed failure when missing _ssl modu…
Browse files Browse the repository at this point in the history
…le (pythonGH-122630) (python#122648)

pythongh-122334: Fix test_embed failure when missing _ssl module (pythonGH-122630)
(cherry picked from commit 50b3603)

Co-authored-by: neonene <[email protected]>
Co-authored-by: Wulian233 <[email protected]>
  • Loading branch information
3 people authored Aug 6, 2024
1 parent 1c4d08d commit b895f18
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Lib/test/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,12 @@ def test_getargs_reset_static_parser(self):
# Test _PyArg_Parser initializations via _PyArg_UnpackKeywords()
# https://github.com/python/cpython/issues/122334
code = textwrap.dedent("""
import _ssl
_ssl.txt2obj(txt='1.3')
try:
import _ssl
except ModuleNotFoundError:
_ssl = None
if _ssl is not None:
_ssl.txt2obj(txt='1.3')
print('1')
import _queue
Expand Down

0 comments on commit b895f18

Please sign in to comment.