diff mbox series

[meta-python] python3-dominate: Fix get_thread_context ptest on musl

Message ID 20230811161310.11632-1-raj.khem@gmail.com
State New
Headers show
Series [meta-python] python3-dominate: Fix get_thread_context ptest on musl | expand

Commit Message

Khem Raj Aug. 11, 2023, 4:13 p.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../python/python3-dominate/fix-ptests.patch  | 20 +++++++++++++++++++
 .../python/python3-dominate_2.8.0.bb          |  1 +
 2 files changed, 21 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-dominate/fix-ptests.patch
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-dominate/fix-ptests.patch b/meta-python/recipes-devtools/python/python3-dominate/fix-ptests.patch
new file mode 100644
index 0000000000..81211d4498
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-dominate/fix-ptests.patch
@@ -0,0 +1,20 @@ 
+Fixes test failures on musl
+
+Fixes errors
+ptestresult.python3-dominate.tests/test_dom_tag.py::test___get_thread_context
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+diff --git a/tests/test_dom_tag.py b/tests/test_dom_tag.py
+index 43ffecb..1126e54 100644
+--- a/tests/test_dom_tag.py
++++ b/tests/test_dom_tag.py
+@@ -18,6 +18,7 @@ def test___get_thread_context(monkeypatch):
+     monkeypatch.setattr(sut, 'threading', threading)
+ 
+     assert sut._get_thread_context() in [
++        1692341442, # Python >= 3.9, 32-bit
+         -6805948436281256182, # Python >= 3.9
+         3713141171098444831, # Python < 3.9
+     ]
diff --git a/meta-python/recipes-devtools/python/python3-dominate_2.8.0.bb b/meta-python/recipes-devtools/python/python3-dominate_2.8.0.bb
index 73701ec72e..6b0489e4fd 100644
--- a/meta-python/recipes-devtools/python/python3-dominate_2.8.0.bb
+++ b/meta-python/recipes-devtools/python/python3-dominate_2.8.0.bb
@@ -8,6 +8,7 @@  inherit pypi setuptools3 ptest
 
 SRC_URI += " \
 	file://run-ptest \
+	file://fix-ptests.patch \
 "
 
 RDEPENDS:${PN}-ptest += " \