1 |
blueness 12/06/17 18:39:10 |
2 |
|
3 |
Added: webapp-config-1.50.16-fix-unicode-tests.patch |
4 |
Log: |
5 |
Fix tests, thanks prometheanfire, bug #421091 |
6 |
|
7 |
(Portage version: 2.1.10.49/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 app-admin/webapp-config/files/webapp-config-1.50.16-fix-unicode-tests.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/webapp-config/files/webapp-config-1.50.16-fix-unicode-tests.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/webapp-config/files/webapp-config-1.50.16-fix-unicode-tests.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: webapp-config-1.50.16-fix-unicode-tests.patch |
16 |
=================================================================== |
17 |
Make strings unicode to fix test failures |
18 |
|
19 |
Python enables unicode by default. Various quoted strings used |
20 |
in tests were not declared as unicode and so caused false failures. |
21 |
This patch addresses this issue. |
22 |
|
23 |
Signed-off-by: Matthew Thode <prometheanfire@g.o> |
24 |
Signed-off-by: Anthony G. Basile <blueness@g.o> |
25 |
|
26 |
diff -rupN webapp-config-1.50.16/WebappConfig.orig/db.py webapp-config-1.50.16/WebappConfig/db.py |
27 |
--- webapp-config-1.50.16/WebappConfig.orig/db.py 2012-06-17 11:10:15.964264617 -0500 |
28 |
+++ webapp-config-1.50.16/WebappConfig/db.py 2012-06-17 11:11:05.364265831 -0500 |
29 |
@@ -186,7 +186,7 @@ class WebappDB(AppHierarchy): |
30 |
>>> sb = [i[1] for i in b.list_locations().items()] |
31 |
>>> sb.sort(lambda x,y: cmp(x[0]+x[1],y[0]+y[1])) |
32 |
>>> sb |
33 |
- [['gallery', '1.4.4_p6'], ['gallery', '2.0_rc2'], ['horde', '3.0.5'], ['phpldapadmin', '0.9.7_alpha4']] |
34 |
+ [[u'gallery', u'1.4.4_p6'], [u'gallery', u'2.0_rc2'], [u'horde', u'3.0.5'], [u'phpldapadmin', u'0.9.7_alpha4']] |
35 |
|
36 |
>>> c = WebappDB(here + '/tests/testfiles/webapps', |
37 |
... package = 'horde', version = '3.0.5') |
38 |
@@ -572,7 +572,7 @@ class WebappSource(AppHierarchy): |
39 |
... 'horde', '3.0.5') |
40 |
>>> d = a.get_source_directories('htdocs') |
41 |
>>> [i for i in d if i != '.svn'] |
42 |
- ['dir1', 'dir2'] |
43 |
+ [u'dir1', u'dir2'] |
44 |
''' |
45 |
dirs = [] |
46 |
|
47 |
@@ -604,7 +604,7 @@ class WebappSource(AppHierarchy): |
48 |
>>> a = WebappSource(here + '/tests/testfiles/share-webapps', |
49 |
... 'horde', '3.0.5') |
50 |
>>> a.get_source_files('htdocs') |
51 |
- ['test1', 'test2'] |
52 |
+ [u'test1', u'test2'] |
53 |
''' |
54 |
|
55 |
files = [] |