forked from pool/python-Twisted
Accepting request 1324668 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1324668 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Twisted?expand=0&rev=76
This commit is contained in:
37
createElement.patch
Normal file
37
createElement.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
From b035f4a1a952c93445a01f2e17df88689ddf9bdf Mon Sep 17 00:00:00 2001
|
||||
From: Glyph <code@glyph.im>
|
||||
Date: Wed, 10 Dec 2025 01:10:32 -0800
|
||||
Subject: [PATCH] use createElement in the test rather than instantiating
|
||||
Element
|
||||
|
||||
---
|
||||
src/twisted/newsfragments/12549.misc | 0
|
||||
src/twisted/web/test/test_domhelpers.py | 6 +++---
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
create mode 100644 src/twisted/newsfragments/12549.misc
|
||||
|
||||
diff --git a/src/twisted/newsfragments/12549.misc b/src/twisted/newsfragments/12549.misc
|
||||
new file mode 100644
|
||||
index 00000000000..e69de29bb2d
|
||||
diff --git a/src/twisted/web/test/test_domhelpers.py b/src/twisted/web/test/test_domhelpers.py
|
||||
index bbefd68516b..d28b89f30e8 100644
|
||||
--- a/src/twisted/web/test/test_domhelpers.py
|
||||
+++ b/src/twisted/web/test/test_domhelpers.py
|
||||
@@ -109,14 +109,14 @@ def test_clearNode(self):
|
||||
doc1 = self.dom.parseString("<a><b><c><d/></c></b></a>")
|
||||
a_node = doc1.documentElement
|
||||
domhelpers.clearNode(a_node)
|
||||
- self.assertEqual(a_node.toxml(), self.dom.Element("a").toxml())
|
||||
+ self.assertEqual(a_node.toxml(), doc1.createElement("a").toxml())
|
||||
|
||||
doc2 = self.dom.parseString("<a><b><c><d/></c></b></a>")
|
||||
b_node = doc2.documentElement.childNodes[0]
|
||||
domhelpers.clearNode(b_node)
|
||||
actual = doc2.documentElement.toxml()
|
||||
- expected = self.dom.Element("a")
|
||||
- expected.appendChild(self.dom.Element("b"))
|
||||
+ expected = doc2.createElement("a")
|
||||
+ expected.appendChild(doc2.createElement("b"))
|
||||
self.assertEqual(actual, expected.toxml())
|
||||
|
||||
def test_get(self):
|
||||
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 29 09:46:30 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add createElement.patch to fix tests with fixed python interpreters
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 26 09:06:02 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@ Patch5: no-cython_test_exception_raiser.patch
|
||||
Patch6: remove-dependency-version-upper-bounds.patch
|
||||
# PATCH-FIX-UPSTREAM https://github.com/twisted/twisted/issues/12430 Add support for Python 3.14
|
||||
Patch7: py314.patch
|
||||
# PATCH-FIX-UPSTREAM https://github.com/twisted/twisted/pull/12551 use createElement in the test rather than instantiating Element
|
||||
Patch8: createElement.patch
|
||||
BuildRequires: %{python_module hatch-fancy-pypi-readme}
|
||||
BuildRequires: %{python_module hatchling}
|
||||
BuildRequires: %{python_module incremental >= 24.7.0}
|
||||
|
||||
Reference in New Issue
Block a user