| 1 |
Description: Ignore two tests which are bound to fail due to a DeprecationWarning in |
| 2 |
Python3.12 which is caused by python-dateutil |
| 3 |
Bug-Debian: https://bugs.debian.or/1058414 |
| 4 |
Author: Andreas Tille <[email protected]> |
| 5 |
Last-Update: 2024-02-08 |
| 6 |
Forwarded: not-needed |
| 7 |
|
| 8 |
--- python-itsdangerous.orig/tests/test_itsdangerous/test_timed.py |
| 9 |
+++ python-itsdangerous/tests/test_itsdangerous/test_timed.py |
| 10 |
@@ -4,7 +4,12 @@ |
| 11 |
from functools import partial |
| 12 |
|
| 13 |
import pytest |
| 14 |
-from freezegun import freeze_time |
| 15 |
+import sys |
| 16 |
+if sys.version_info > (3, 12): |
| 17 |
+ pytestmark = pytest.mark.skipif(reason="For Python3 >= 3.12 dateutils throws DeprecationWarning which breaks the following tests which are ignored here") |
| 18 |
+ pass |
| 19 |
+else: |
| 20 |
+ from freezegun import freeze_time |
| 21 |
|
| 22 |
from itsdangerous.exc import BadTimeSignature |
| 23 |
from itsdangerous.exc import SignatureExpired |
| 24 |
--- python-itsdangerous.orig/tests/test_itsdangerous/test_url_safe.py |
| 25 |
+++ python-itsdangerous/tests/test_itsdangerous/test_url_safe.py |
| 26 |
@@ -1,6 +1,9 @@ |
| 27 |
from functools import partial |
| 28 |
|
| 29 |
import pytest |
| 30 |
+import sys |
| 31 |
+if sys.version_info > (3, 12): |
| 32 |
+ pytestmark = pytest.mark.skipif(reason="For Python3 >= 3.12 dateutils throws DeprecationWarning which breaks the following tests which are ignored here") |
| 33 |
|
| 34 |
from itsdangerous.url_safe import URLSafeSerializer |
| 35 |
from itsdangerous.url_safe import URLSafeTimedSerializer |