summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-dominate
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-10-28 10:14:15 -0700
committerKhem Raj <raj.khem@gmail.com>2024-10-28 17:53:20 -0700
commite8f04afdd1a1715472dfadbe506dfc5513b7c403 (patch)
tree290388405163797f7112916787cd227ade6968d4 /meta-python/recipes-devtools/python/python3-dominate
parenta06cb562830b68fa11022090086531222c2b18f7 (diff)
downloadmeta-openembedded-e8f04afdd1a1715472dfadbe506dfc5513b7c403.tar.gz
python3-dominate: Fix ptests with python 3.13
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-dominate')
-rw-r--r--meta-python/recipes-devtools/python/python3-dominate/58f7d7fdb171f80ed6ce97e6ca4409723975c47f.patch40
1 files changed, 40 insertions, 0 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 @@
1From 58f7d7fdb171f80ed6ce97e6ca4409723975c47f Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
3Date: Sat, 3 Aug 2024 16:07:38 +0200
4Subject: [PATCH] Update tests for docstring dedenting in Python 3.13
5
6Update the `get_expected()` function to account for the fact that
7Python 3.13 automatically dedents all the docstrings, and therefore
8does not require explicitly removing the indent (which effectively
9removes too much indent).
10
11Fixes #199
12
13Upstream-Status: Submitted [https://github.com/Knio/dominate/pull/202]
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 tests/test_svg.py | 7 ++++++-
17 1 file changed, 6 insertions(+), 1 deletion(-)
18
19diff --git a/tests/test_svg.py b/tests/test_svg.py
20index 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):