Commit 48530a9
committed
gh-112769: test_zlib: Fix comparison of ZLIB_RUNTIME_VERSION with non-int suffix
zlib-ng defines the version as "1.3.0.zlib-ng".
https://github.com/zlib-ng/zlib-ng/blob/f3211aba349a1d4781d0d41cb00d29fb8325af06/zlib.h.in#L61
test.test_zlib.CompressObjectTestCase.test_flushes blew up with:
Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.12.0/Lib/test/test_zlib.py", line 477, in test_flushes
ver = tuple(int(v) for v in zlib.ZLIB_RUNTIME_VERSION.split('.'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/Python-3.12.0/Lib/test/test_zlib.py", line 477, in <genexpr>
ver = tuple(int(v) for v in zlib.ZLIB_RUNTIME_VERSION.split('.'))
^^^^^^
ValueError: invalid literal for int() with base 10: 'zlib-ng'
This reuses logic from another test.
Fixes #1127691 parent 11d88a1 commit 48530a9
File tree
2 files changed
+20
-12
lines changed- Lib/test
- Misc/NEWS.d/next/Tests
2 files changed
+20
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
21 | 36 | | |
22 | 37 | | |
23 | 38 | | |
| |||
473 | 488 | | |
474 | 489 | | |
475 | 490 | | |
476 | | - | |
477 | 491 | | |
478 | | - | |
| 492 | + | |
479 | 493 | | |
480 | 494 | | |
481 | 495 | | |
| |||
793 | 807 | | |
794 | 808 | | |
795 | 809 | | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
| 810 | + | |
806 | 811 | | |
807 | 812 | | |
808 | 813 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments