diff options
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-dominate')
-rw-r--r-- | meta-python/recipes-devtools/python/python3-dominate/58f7d7fdb171f80ed6ce97e6ca4409723975c47f.patch | 40 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-dominate/run-ptest | 3 |
2 files changed, 40 insertions, 3 deletions
diff --git a/meta-python/recipes-devtools/python/python3-dominate/58f7d7fdb171f80ed6ce97e6ca4409723975c47f.patch b/meta-python/recipes-devtools/python/python3-dominate/58f7d7fdb171f80ed6ce97e6ca4409723975c47f.patch new file mode 100644 index 0000000000..e3d0d485ee --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-dominate/58f7d7fdb171f80ed6ce97e6ca4409723975c47f.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 58f7d7fdb171f80ed6ce97e6ca4409723975c47f Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> | ||
3 | Date: Sat, 3 Aug 2024 16:07:38 +0200 | ||
4 | Subject: [PATCH] Update tests for docstring dedenting in Python 3.13 | ||
5 | |||
6 | Update the `get_expected()` function to account for the fact that | ||
7 | Python 3.13 automatically dedents all the docstrings, and therefore | ||
8 | does not require explicitly removing the indent (which effectively | ||
9 | removes too much indent). | ||
10 | |||
11 | Fixes #199 | ||
12 | |||
13 | Upstream-Status: Submitted [https://github.com/Knio/dominate/pull/202] | ||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | tests/test_svg.py | 7 ++++++- | ||
17 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/tests/test_svg.py b/tests/test_svg.py | ||
20 | index e5bbec3..ea7d98f 100644 | ||
21 | --- a/tests/test_svg.py | ||
22 | +++ b/tests/test_svg.py | ||
23 | @@ -1,3 +1,5 @@ | ||
24 | +import sys | ||
25 | + | ||
26 | import dominate.svg | ||
27 | from dominate.tags import * | ||
28 | from dominate.svg import * | ||
29 | @@ -14,7 +16,10 @@ def base(): | ||
30 | |||
31 | |||
32 | def get_expected(func): | ||
33 | - return func.__doc__.replace('\n ', '\n').strip() | ||
34 | + doc = func.__doc__ | ||
35 | + if sys.version_info < (3, 13): | ||
36 | + doc = doc.replace('\n ', '\n') | ||
37 | + return doc.strip() | ||
38 | |||
39 | |||
40 | def output_test(func): | ||
diff --git a/meta-python/recipes-devtools/python/python3-dominate/run-ptest b/meta-python/recipes-devtools/python/python3-dominate/run-ptest deleted file mode 100644 index 8d2017d39c..0000000000 --- a/meta-python/recipes-devtools/python/python3-dominate/run-ptest +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | pytest --automake | ||