Commit 7960384
committed
test_inspect_wrapped_property: handle fixed wrapper inspection
Python upstream recently fixed the behavior of inspect with
wrappers: python/cpython#112006 . The
assertion here relies on the broken behavior, we only get None
if `inspect(Wrapped)` fails and raises `ValueError`. Now it
works, we actually get the correct answer, 1. This changes it so
we assert the correct thing depending on the Python version (the
fix was backported to 3.11.9 and 3.12.3, so the check has to be a
bit complicated).
Signed-off-by: Adam Williamson <[email protected]>1 parent b79a954 commit 7960384
1 file changed
+21
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
482 | 483 | | |
483 | 484 | | |
484 | 485 | | |
485 | | - | |
486 | | - | |
487 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
0 commit comments