summaryrefslogtreecommitdiff
path: root/dev-python/lxml/files/lxml-5.3.0-pypy.patch
blob: c83c73c819347937d6187795769bc4f226b94f80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
From b6ba59657c8c7e169e8eeb763d85ca6136df3eea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Fri, 29 Mar 2024 16:22:00 +0100
Subject: [PATCH] skip tests that are broken on pypy

---
 src/lxml/tests/test_http_io.py   |  3 ++-
 src/lxml/tests/test_nsclasses.py |  3 ++-
 src/lxml/tests/test_objectify.py | 37 ++++++++++++++++++++++++++++++--
 3 files changed, 39 insertions(+), 4 deletions(-)

diff --git a/src/lxml/tests/test_http_io.py b/src/lxml/tests/test_http_io.py
index 8385e393..0b259299 100644
--- a/src/lxml/tests/test_http_io.py
+++ b/src/lxml/tests/test_http_io.py
@@ -10,3 +10,3 @@ import gzip
 
-from .common_imports import etree, HelperTestCase, BytesIO, _bytes
+from .common_imports import etree, HelperTestCase, BytesIO, _bytes, IS_PYPY
 from .dummy_http_server import webserver, HTTPRequestCollector
@@ -14,2 +14,3 @@ from .dummy_http_server import webserver, HTTPRequestCollector
 
+@unittest.skipIf(IS_PYPY, "broken on pypy")
 class HttpIOTestCase(HelperTestCase):
diff --git a/src/lxml/tests/test_nsclasses.py b/src/lxml/tests/test_nsclasses.py
index 0c33f20c..08540001 100644
--- a/src/lxml/tests/test_nsclasses.py
+++ b/src/lxml/tests/test_nsclasses.py
@@ -8,3 +8,3 @@ import unittest
 
-from .common_imports import etree, HelperTestCase, _bytes, make_doctest
+from .common_imports import etree, HelperTestCase, _bytes, make_doctest, IS_PYPY
 
@@ -45,2 +45,3 @@ class ETreeNamespaceClassesTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_ns_classes(self):
diff --git a/src/lxml/tests/test_objectify.py b/src/lxml/tests/test_objectify.py
index 39fe0098..92c857f8 100644
--- a/src/lxml/tests/test_objectify.py
+++ b/src/lxml/tests/test_objectify.py
@@ -10,3 +10,4 @@ import unittest
 from .common_imports import (
-    etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO
+    etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO,
+    IS_PYPY
 )
@@ -383,2 +384,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_setattr(self):
@@ -818,2 +820,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_build_tree(self):
@@ -847,2 +850,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_bool(self):
@@ -884,2 +888,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_str(self):
@@ -891,2 +896,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_str_intliteral(self):
@@ -898,2 +904,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_str_floatliteral(self):
@@ -905,2 +912,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_str_mul(self):
@@ -917,2 +925,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_str_add(self):
@@ -992,2 +1001,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_ustr(self):
@@ -999,2 +1009,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_ustr_intliteral(self):
@@ -1006,2 +1017,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_ustr_floatliteral(self):
@@ -1013,2 +1025,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_ustr_mul(self):
@@ -1025,2 +1038,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_ustr_add(self):
@@ -1050,2 +1064,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_int(self):
@@ -1066,2 +1081,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_float(self):
@@ -1082,2 +1098,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_float_precision(self):
@@ -1101,2 +1118,3 @@ class ObjectifyTestCase(HelperTestCase):
   
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_float_precision_consistency(self):
@@ -1187,2 +1205,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_unregistered(self):
@@ -1349,2 +1368,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_str_cmp(self):
@@ -1376,2 +1396,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_int_cmp(self):
@@ -1398,2 +1419,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_type_bool_cmp(self):
@@ -2067,2 +2089,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_registered_type_stringify(self):
@@ -2537,2 +2560,3 @@ class ObjectifyTestCase(HelperTestCase):
     # type-looked-up as ObjectifiedElement (no annotations)
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_efactory_int(self):
@@ -2542,2 +2566,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_efactory_float(self):
@@ -2547,2 +2572,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_efactory_str(self):
@@ -2552,2 +2578,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_efactory_unicode(self):
@@ -2557,2 +2584,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_efactory_bool(self):
@@ -2562,2 +2590,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_efactory_none(self):
@@ -2567,2 +2596,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_efactory_value_concatenation(self):
@@ -2577,2 +2607,3 @@ class ObjectifyTestCase(HelperTestCase):
 
+    @unittest.skipIf(IS_PYPY, "broken on pypy")
     def test_efactory_nested(self):
@@ -2745,3 +2776,5 @@ def test_suite():
     suite.addTests(doctest.DocTestSuite(objectify))
-    suite.addTests([make_doctest('objectify.txt')])
+    if not IS_PYPY:
+        suite.addTests([make_doctest('objectify.txt')])
+        suite.addTests([make_doctest('../../../doc/objectify.txt')])
     return suite
-- 
2.46.0