1 |
idella4 14/04/01 11:17:49 |
2 |
|
3 |
Added: py3tests.patch |
4 |
Log: |
5 |
install phase tidied, un-needed removal of tests folders removed, test phase revised and fixed for py3 due to flaws in the source code's setup, includes the patch. Fixes Bugs #493500 by Nikoli and #476246 by Patrick |
6 |
|
7 |
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0xB8072B0D) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-python/bsddb3/files/py3tests.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/bsddb3/files/py3tests.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/bsddb3/files/py3tests.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: py3tests.patch |
16 |
=================================================================== |
17 |
The code for running tests under py3 is flawed in 2 distinct areas for running tests in the source. |
18 |
This patch corrects use of local import syntax in tests under Lib3/, the libs for py3. |
19 |
The other appears a typo or an oversight; entry of suite instead of test_suite in 1 test file. |
20 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_associate.py bsddb3-6.0.1/Lib3/bsddb/test/test_associate.py |
21 |
--- Lib3/bsddb/test/test_associate.py 2013-12-05 03:52:00.000000000 +0800 |
22 |
+++ Lib3/bsddb/test/test_associate.py 2014-04-01 16:30:39.219546604 +0800 |
23 |
@@ -42,7 +42,7 @@ |
24 |
from pprint import pprint |
25 |
|
26 |
import unittest |
27 |
-from .test_all import db, dbshelve, test_support, verbose, have_threads, \ |
28 |
+from test_all import db, dbshelve, test_support, verbose, have_threads, \ |
29 |
get_new_environment_path |
30 |
|
31 |
|
32 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_basics.py bsddb3-6.0.1/Lib3/bsddb/test/test_basics.py |
33 |
--- Lib3/bsddb/test/test_basics.py 2013-12-05 03:51:55.000000000 +0800 |
34 |
+++ Lib3/bsddb/test/test_basics.py 2014-04-01 16:30:39.223546604 +0800 |
35 |
@@ -46,7 +46,7 @@ |
36 |
import time |
37 |
import sys |
38 |
|
39 |
-from .test_all import db, test_support, verbose, get_new_environment_path, \ |
40 |
+from test_all import db, test_support, verbose, get_new_environment_path, \ |
41 |
get_new_database_path |
42 |
|
43 |
DASH = '-' |
44 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_compare.py bsddb3-6.0.1/Lib3/bsddb/test/test_compare.py |
45 |
--- Lib3/bsddb/test/test_compare.py 2013-12-05 03:52:05.000000000 +0800 |
46 |
+++ Lib3/bsddb/test/test_compare.py 2014-04-01 16:32:43.704544030 +0800 |
47 |
@@ -38,12 +38,12 @@ |
48 |
""" |
49 |
|
50 |
import sys, os, re |
51 |
-from . import test_all |
52 |
+import test_all |
53 |
from io import StringIO |
54 |
|
55 |
import unittest |
56 |
|
57 |
-from .test_all import db, dbshelve, test_support, \ |
58 |
+from test_all import db, dbshelve, test_support, \ |
59 |
get_new_environment_path, get_new_database_path |
60 |
|
61 |
|
62 |
@@ -479,4 +479,4 @@ |
63 |
return res |
64 |
|
65 |
if __name__ == '__main__': |
66 |
- unittest.main(defaultTest = 'suite') |
67 |
+ unittest.main(defaultTest = 'test_suite') |
68 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_compat.py bsddb3-6.0.1/Lib3/bsddb/test/test_compat.py |
69 |
--- Lib3/bsddb/test/test_compat.py 2013-12-05 03:51:41.000000000 +0800 |
70 |
+++ Lib3/bsddb/test/test_compat.py 2014-04-01 16:30:39.225546604 +0800 |
71 |
@@ -41,7 +41,7 @@ |
72 |
import os, string |
73 |
import unittest |
74 |
|
75 |
-from .test_all import db, hashopen, btopen, rnopen, verbose, \ |
76 |
+from test_all import db, hashopen, btopen, rnopen, verbose, \ |
77 |
get_new_database_path |
78 |
|
79 |
|
80 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_cursor_pget_bug.py bsddb3-6.0.1/Lib3/bsddb/test/test_cursor_pget_bug.py |
81 |
--- Lib3/bsddb/test/test_cursor_pget_bug.py 2013-12-05 03:51:53.000000000 +0800 |
82 |
+++ Lib3/bsddb/test/test_cursor_pget_bug.py 2014-04-01 16:30:39.225546604 +0800 |
83 |
@@ -36,7 +36,7 @@ |
84 |
import unittest |
85 |
import os, glob |
86 |
|
87 |
-from .test_all import db, test_support, get_new_environment_path, \ |
88 |
+from test_all import db, test_support, get_new_environment_path, \ |
89 |
get_new_database_path |
90 |
|
91 |
#---------------------------------------------------------------------- |
92 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_dbenv.py bsddb3-6.0.1/Lib3/bsddb/test/test_dbenv.py |
93 |
--- Lib3/bsddb/test/test_dbenv.py 2013-12-05 03:52:09.000000000 +0800 |
94 |
+++ Lib3/bsddb/test/test_dbenv.py 2014-04-01 16:30:39.227546604 +0800 |
95 |
@@ -36,7 +36,7 @@ |
96 |
import unittest |
97 |
import os, glob |
98 |
|
99 |
-from .test_all import db, test_support, get_new_environment_path, \ |
100 |
+from test_all import db, test_support, get_new_environment_path, \ |
101 |
get_new_database_path |
102 |
|
103 |
#---------------------------------------------------------------------- |
104 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_dbobj.py bsddb3-6.0.1/Lib3/bsddb/test/test_dbobj.py |
105 |
--- Lib3/bsddb/test/test_dbobj.py 2013-12-05 03:51:52.000000000 +0800 |
106 |
+++ Lib3/bsddb/test/test_dbobj.py 2014-04-01 16:30:39.227546604 +0800 |
107 |
@@ -37,7 +37,7 @@ |
108 |
import os, string |
109 |
import unittest |
110 |
|
111 |
-from .test_all import db, dbobj, test_support, get_new_environment_path, \ |
112 |
+from test_all import db, dbobj, test_support, get_new_environment_path, \ |
113 |
get_new_database_path |
114 |
|
115 |
#---------------------------------------------------------------------- |
116 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_db.py bsddb3-6.0.1/Lib3/bsddb/test/test_db.py |
117 |
--- Lib3/bsddb/test/test_db.py 2013-12-05 03:52:12.000000000 +0800 |
118 |
+++ Lib3/bsddb/test/test_db.py 2014-04-01 16:30:39.228546604 +0800 |
119 |
@@ -36,7 +36,7 @@ |
120 |
import unittest |
121 |
import os, glob |
122 |
|
123 |
-from .test_all import db, test_support, get_new_environment_path, \ |
124 |
+from test_all import db, test_support, get_new_environment_path, \ |
125 |
get_new_database_path |
126 |
|
127 |
#---------------------------------------------------------------------- |
128 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_dbshelve.py bsddb3-6.0.1/Lib3/bsddb/test/test_dbshelve.py |
129 |
--- Lib3/bsddb/test/test_dbshelve.py 2013-12-05 03:52:04.000000000 +0800 |
130 |
+++ Lib3/bsddb/test/test_dbshelve.py 2014-04-01 16:30:39.229546604 +0800 |
131 |
@@ -42,7 +42,7 @@ |
132 |
import unittest |
133 |
|
134 |
|
135 |
-from .test_all import db, dbshelve, test_support, verbose, \ |
136 |
+from test_all import db, dbshelve, test_support, verbose, \ |
137 |
get_new_environment_path, get_new_database_path |
138 |
|
139 |
|
140 |
@@ -73,14 +73,14 @@ |
141 |
|
142 |
def setUp(self): |
143 |
if sys.version_info[0] >= 3 : |
144 |
- from .test_all import do_proxy_db_py3k |
145 |
+ from test_all import do_proxy_db_py3k |
146 |
self._flag_proxy_db_py3k = do_proxy_db_py3k(False) |
147 |
self.filename = get_new_database_path() |
148 |
self.do_open() |
149 |
|
150 |
def tearDown(self): |
151 |
if sys.version_info[0] >= 3 : |
152 |
- from .test_all import do_proxy_db_py3k |
153 |
+ from test_all import do_proxy_db_py3k |
154 |
do_proxy_db_py3k(self._flag_proxy_db_py3k) |
155 |
self.do_close() |
156 |
test_support.unlink(self.filename) |
157 |
@@ -340,7 +340,7 @@ |
158 |
|
159 |
def tearDown(self): |
160 |
if sys.version_info[0] >= 3 : |
161 |
- from .test_all import do_proxy_db_py3k |
162 |
+ from test_all import do_proxy_db_py3k |
163 |
do_proxy_db_py3k(self._flag_proxy_db_py3k) |
164 |
self.do_close() |
165 |
test_support.rmtree(self.homeDir) |
166 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_dbtables.py bsddb3-6.0.1/Lib3/bsddb/test/test_dbtables.py |
167 |
--- Lib3/bsddb/test/test_dbtables.py 2013-12-05 03:51:49.000000000 +0800 |
168 |
+++ Lib3/bsddb/test/test_dbtables.py 2014-04-01 16:30:39.231546604 +0800 |
169 |
@@ -32,7 +32,7 @@ |
170 |
import pickle |
171 |
|
172 |
import unittest |
173 |
-from .test_all import db, dbtables, test_support, verbose, \ |
174 |
+from test_all import db, dbtables, test_support, verbose, \ |
175 |
get_new_environment_path, get_new_database_path |
176 |
|
177 |
#---------------------------------------------------------------------- |
178 |
@@ -43,7 +43,7 @@ |
179 |
def setUp(self): |
180 |
import sys |
181 |
if sys.version_info[0] >= 3 : |
182 |
- from .test_all import do_proxy_db_py3k |
183 |
+ from test_all import do_proxy_db_py3k |
184 |
self._flag_proxy_db_py3k = do_proxy_db_py3k(False) |
185 |
|
186 |
self.testHomeDir = get_new_environment_path() |
187 |
@@ -54,7 +54,7 @@ |
188 |
self.tdb.close() |
189 |
import sys |
190 |
if sys.version_info[0] >= 3 : |
191 |
- from .test_all import do_proxy_db_py3k |
192 |
+ from test_all import do_proxy_db_py3k |
193 |
do_proxy_db_py3k(self._flag_proxy_db_py3k) |
194 |
test_support.rmtree(self.testHomeDir) |
195 |
|
196 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_distributed_transactions.py bsddb3-6.0.1/Lib3/bsddb/test/test_distributed_transactions.py |
197 |
--- Lib3/bsddb/test/test_distributed_transactions.py 2013-12-05 03:51:40.000000000 +0800 |
198 |
+++ Lib3/bsddb/test/test_distributed_transactions.py 2014-04-01 16:30:39.231546604 +0800 |
199 |
@@ -39,10 +39,10 @@ |
200 |
import os |
201 |
import unittest |
202 |
|
203 |
-from .test_all import db, test_support, get_new_environment_path, \ |
204 |
+from test_all import db, test_support, get_new_environment_path, \ |
205 |
get_new_database_path |
206 |
|
207 |
-from .test_all import verbose |
208 |
+from test_all import verbose |
209 |
|
210 |
#---------------------------------------------------------------------- |
211 |
|
212 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_early_close.py bsddb3-6.0.1/Lib3/bsddb/test/test_early_close.py |
213 |
--- Lib3/bsddb/test/test_early_close.py 2013-12-05 03:51:47.000000000 +0800 |
214 |
+++ Lib3/bsddb/test/test_early_close.py 2014-04-01 16:30:39.232546604 +0800 |
215 |
@@ -40,7 +40,7 @@ |
216 |
import os, sys |
217 |
import unittest |
218 |
|
219 |
-from .test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path |
220 |
+from test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path |
221 |
|
222 |
# We're going to get warnings in this module about trying to close the db when |
223 |
# its env is already closed. Let's just ignore those. |
224 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_fileid.py bsddb3-6.0.1/Lib3/bsddb/test/test_fileid.py |
225 |
--- Lib3/bsddb/test/test_fileid.py 2013-12-05 03:51:44.000000000 +0800 |
226 |
+++ Lib3/bsddb/test/test_fileid.py 2014-04-01 16:30:39.233546604 +0800 |
227 |
@@ -40,7 +40,7 @@ |
228 |
import shutil |
229 |
import unittest |
230 |
|
231 |
-from .test_all import db, test_support, get_new_environment_path, get_new_database_path |
232 |
+from test_all import db, test_support, get_new_environment_path, get_new_database_path |
233 |
|
234 |
class FileidResetTestCase(unittest.TestCase): |
235 |
def setUp(self): |
236 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_get_none.py bsddb3-6.0.1/Lib3/bsddb/test/test_get_none.py |
237 |
--- Lib3/bsddb/test/test_get_none.py 2013-12-05 03:51:56.000000000 +0800 |
238 |
+++ Lib3/bsddb/test/test_get_none.py 2014-04-01 16:30:39.233546604 +0800 |
239 |
@@ -40,7 +40,7 @@ |
240 |
import os, string |
241 |
import unittest |
242 |
|
243 |
-from .test_all import db, verbose, get_new_database_path |
244 |
+from test_all import db, verbose, get_new_database_path |
245 |
|
246 |
|
247 |
#---------------------------------------------------------------------- |
248 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_join.py bsddb3-6.0.1/Lib3/bsddb/test/test_join.py |
249 |
--- Lib3/bsddb/test/test_join.py 2013-12-05 03:51:46.000000000 +0800 |
250 |
+++ Lib3/bsddb/test/test_join.py 2014-04-01 16:30:39.234546604 +0800 |
251 |
@@ -40,7 +40,7 @@ |
252 |
|
253 |
import unittest |
254 |
|
255 |
-from .test_all import db, dbshelve, test_support, verbose, \ |
256 |
+from test_all import db, dbshelve, test_support, verbose, \ |
257 |
get_new_environment_path, get_new_database_path |
258 |
|
259 |
#---------------------------------------------------------------------- |
260 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_lock.py bsddb3-6.0.1/Lib3/bsddb/test/test_lock.py |
261 |
--- Lib3/bsddb/test/test_lock.py 2013-12-05 03:52:03.000000000 +0800 |
262 |
+++ Lib3/bsddb/test/test_lock.py 2014-04-01 16:30:39.234546604 +0800 |
263 |
@@ -40,7 +40,7 @@ |
264 |
import time |
265 |
|
266 |
import unittest |
267 |
-from .test_all import db, test_support, verbose, have_threads, \ |
268 |
+from test_all import db, test_support, verbose, have_threads, \ |
269 |
get_new_environment_path, get_new_database_path |
270 |
|
271 |
if have_threads : |
272 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_misc.py bsddb3-6.0.1/Lib3/bsddb/test/test_misc.py |
273 |
--- Lib3/bsddb/test/test_misc.py 2013-12-05 03:51:48.000000000 +0800 |
274 |
+++ Lib3/bsddb/test/test_misc.py 2014-04-01 16:30:39.235546604 +0800 |
275 |
@@ -39,7 +39,7 @@ |
276 |
import os, sys |
277 |
import unittest |
278 |
|
279 |
-from .test_all import db, dbshelve, hashopen, test_support, get_new_environment_path, get_new_database_path |
280 |
+from test_all import db, dbshelve, hashopen, test_support, get_new_environment_path, get_new_database_path |
281 |
|
282 |
#---------------------------------------------------------------------- |
283 |
|
284 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_pickle.py bsddb3-6.0.1/Lib3/bsddb/test/test_pickle.py |
285 |
--- Lib3/bsddb/test/test_pickle.py 2013-12-05 03:51:41.000000000 +0800 |
286 |
+++ Lib3/bsddb/test/test_pickle.py 2014-04-01 16:30:39.235546604 +0800 |
287 |
@@ -47,7 +47,7 @@ |
288 |
|
289 |
import unittest |
290 |
|
291 |
-from .test_all import db, test_support, get_new_environment_path, get_new_database_path |
292 |
+from test_all import db, test_support, get_new_environment_path, get_new_database_path |
293 |
|
294 |
#---------------------------------------------------------------------- |
295 |
|
296 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_queue.py bsddb3-6.0.1/Lib3/bsddb/test/test_queue.py |
297 |
--- Lib3/bsddb/test/test_queue.py 2013-12-05 03:51:50.000000000 +0800 |
298 |
+++ Lib3/bsddb/test/test_queue.py 2014-04-01 16:30:39.236546604 +0800 |
299 |
@@ -41,7 +41,7 @@ |
300 |
from pprint import pprint |
301 |
import unittest |
302 |
|
303 |
-from .test_all import db, verbose, get_new_database_path |
304 |
+from test_all import db, verbose, get_new_database_path |
305 |
|
306 |
#---------------------------------------------------------------------- |
307 |
|
308 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_recno.py bsddb3-6.0.1/Lib3/bsddb/test/test_recno.py |
309 |
--- Lib3/bsddb/test/test_recno.py 2013-12-05 03:52:01.000000000 +0800 |
310 |
+++ Lib3/bsddb/test/test_recno.py 2014-04-01 16:30:39.237546604 +0800 |
311 |
@@ -41,7 +41,7 @@ |
312 |
from pprint import pprint |
313 |
import unittest |
314 |
|
315 |
-from .test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path |
316 |
+from test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path |
317 |
|
318 |
letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' |
319 |
|
320 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_replication.py bsddb3-6.0.1/Lib3/bsddb/test/test_replication.py |
321 |
--- Lib3/bsddb/test/test_replication.py 2013-12-05 03:51:58.000000000 +0800 |
322 |
+++ Lib3/bsddb/test/test_replication.py 2014-04-01 16:30:39.239546604 +0800 |
323 |
@@ -40,7 +40,7 @@ |
324 |
import time |
325 |
import unittest |
326 |
|
327 |
-from .test_all import db, test_support, have_threads, verbose, \ |
328 |
+from test_all import db, test_support, have_threads, verbose, \ |
329 |
get_new_environment_path, get_new_database_path |
330 |
|
331 |
|
332 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_sequence.py bsddb3-6.0.1/Lib3/bsddb/test/test_sequence.py |
333 |
--- Lib3/bsddb/test/test_sequence.py 2013-12-05 03:51:51.000000000 +0800 |
334 |
+++ Lib3/bsddb/test/test_sequence.py 2014-04-01 16:30:39.239546604 +0800 |
335 |
@@ -36,7 +36,7 @@ |
336 |
import unittest |
337 |
import os |
338 |
|
339 |
-from .test_all import db, test_support, get_new_environment_path, get_new_database_path |
340 |
+from test_all import db, test_support, get_new_environment_path, get_new_database_path |
341 |
|
342 |
|
343 |
class DBSequenceTest(unittest.TestCase): |
344 |
diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_thread.py bsddb3-6.0.1/Lib3/bsddb/test/test_thread.py |
345 |
--- Lib3/bsddb/test/test_thread.py 2013-12-05 03:51:39.000000000 +0800 |
346 |
+++ Lib3/bsddb/test/test_thread.py 2014-04-01 16:30:39.241546604 +0800 |
347 |
@@ -51,7 +51,7 @@ |
348 |
pass |
349 |
|
350 |
import unittest |
351 |
-from .test_all import db, dbutils, test_support, verbose, have_threads, \ |
352 |
+from test_all import db, dbutils, test_support, verbose, have_threads, \ |
353 |
get_new_environment_path, get_new_database_path |
354 |
|
355 |
if have_threads : |