Skip to content

Commit

Permalink
pythongh-122334: Fix test_embed failure when missing _ssl module (pyt…
Browse files Browse the repository at this point in the history
…honGH-122630)

Co-authored-by: Wulian233 <[email protected]>
  • Loading branch information
2 people authored and blhsing committed Aug 22, 2024
1 parent fe713fc commit fe90be4
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 @@ -465,8 +465,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 fe90be4

Please sign in to comment.