Skip to content

Commit a6c0fa9

Browse files
Merge pull request actions#197 from e-korolevskii/fix-tests-for-python-3.12
Fix tests for python 3.12
2 parents 1c70aa4 + 929dab9 commit a6c0fa9

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

tests/sources/python-config-test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
exit(1)
7979

8080
### Validate libreadline
81-
if not have_libreadline:
82-
print('Missing libreadline')
83-
exit(1)
81+
if sys.version_info < (3, 12):
82+
if not have_libreadline:
83+
print('Missing libreadline')
84+
exit(1)

tests/sources/python-modules.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,10 @@ def replace(lst, old, new):
271271
standard_library.remove('tkinter')
272272
standard_library.remove('turtle')
273273

274+
# 'smtpd' module has been removed from Python 3.12
275+
if sys.version_info >= (3, 12):
276+
standard_library.remove('smtpd')
277+
274278
# Remove tkinter and Easter eggs
275279
excluded_modules = [
276280
'antigravity',

0 commit comments

Comments
 (0)