Skip to content

Commit

Permalink
[3.13] gh-122334: Fix test_embed failure when missing _ssl module (GH…
Browse files Browse the repository at this point in the history
…-122630) (#122647)

gh-122334: Fix test_embed failure when missing _ssl module (GH-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 24d15f0 commit e808146
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 @@ -464,8 +464,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 e808146

Please sign in to comment.