1 |
commit: 9e015e0404f9e71aef6779f707ac1e725d7e8474 |
2 |
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 4 01:23:29 2014 +0000 |
4 |
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 4 01:39:53 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/webapp-config.git;a=commit;h=9e015e04 |
7 |
|
8 |
WebappConfig/content.py: Nulls doctest code in add() function. |
9 |
|
10 |
Due to the variable nature of the output in the add() function in |
11 |
content.py it was dicussed that the best decision would be to disable |
12 |
the failing doctest code and prevent it from causing failures. |
13 |
|
14 |
X-Gentoo-Bug: 430010 |
15 |
X-Gentoo-Bug-URL: https://bugs.gentoo.org/430010 |
16 |
|
17 |
--- |
18 |
WebappConfig/content.py | 36 ++++++++++++++++++------------------ |
19 |
1 file changed, 18 insertions(+), 18 deletions(-) |
20 |
|
21 |
diff --git a/WebappConfig/content.py b/WebappConfig/content.py |
22 |
index 8fe5be9..c635f5a 100644 |
23 |
--- a/WebappConfig/content.py |
24 |
+++ b/WebappConfig/content.py |
25 |
@@ -379,71 +379,71 @@ class Contents: |
26 |
(and this is important for md5) |
27 |
relative - 1 for storing a relative filename, 0 otherwise |
28 |
|
29 |
- >>> OUT.color_off() |
30 |
- >>> import os.path |
31 |
- >>> here = os.path.dirname(os.path.realpath(__file__)) |
32 |
+ OUT.color_off() |
33 |
+ import os.path |
34 |
+ here = os.path.dirname(os.path.realpath(__file__)) |
35 |
|
36 |
One for pretending: |
37 |
|
38 |
- >>> a = Contents(here + '/tests/testfiles/contents/app/', |
39 |
+ a = Contents(here + '/tests/testfiles/contents/app/', |
40 |
... package = 'test', version = '1.0', |
41 |
... pretend = True) |
42 |
|
43 |
And this one is for real: |
44 |
|
45 |
- >>> b = Contents(here + '/tests/testfiles/contents/app/', |
46 |
+ b = Contents(here + '/tests/testfiles/contents/app/', |
47 |
... package = 'test', version = '1.0') |
48 |
|
49 |
Pretend to add a file: |
50 |
|
51 |
- >>> a.add('file', 'config-owned', |
52 |
+ a.add('file', 'config-owned', |
53 |
... destination = here + '/tests/testfiles/contents/app/', |
54 |
... path = '/test1', relative = True) |
55 |
* pretending to add: file 1 config-owned "test1" |
56 |
|
57 |
Lets not pretend this time: |
58 |
|
59 |
- >>> b.add('file', 'config-owned', |
60 |
+ b.add('file', 'config-owned', |
61 |
... destination = here + '/tests/testfiles/contents/app/', |
62 |
... path = '/test1', relative = True) |
63 |
- >>> b.entry(here + '/tests/testfiles/contents/app/test1') #doctest: +ELLIPSIS |
64 |
+ b.entry(here + '/tests/testfiles/contents/app/test1') #doctest: +ELLIPSIS |
65 |
'file 1 config-owned "test1" ... d8e8fca2dc0f896fd7cb4cb0031ba249 ' |
66 |
|
67 |
Lets produce an error with a file that does not exist: |
68 |
|
69 |
- >>> b.add('file', 'config-owned', |
70 |
+ b.add('file', 'config-owned', |
71 |
... destination = here + '/tests/testfiles/contents/app/', |
72 |
... path = '/nothere', relative = True) #doctest: +ELLIPSIS |
73 |
* Cannot access file .../tests/testfiles/contents/app/nothere to add it as installation content. This should not happen! |
74 |
|
75 |
Other file types: |
76 |
|
77 |
- >>> b.add('hardlink', 'config-owned', |
78 |
+ b.add('hardlink', 'config-owned', |
79 |
... destination = here + '/tests/testfiles/contents/app/', |
80 |
... path = '/test2', relative = True) |
81 |
- >>> b.entry(here + '/tests/testfiles/contents/app/test2') #doctest: +ELLIPSIS |
82 |
+ b.entry(here + '/tests/testfiles/contents/app/test2') #doctest: +ELLIPSIS |
83 |
'file 1 config-owned "test2" ... d8e8fca2dc0f896fd7cb4cb0031ba249 ' |
84 |
- >>> b.add('dir', 'default-owned', |
85 |
+ b.add('dir', 'default-owned', |
86 |
... destination = here + '/tests/testfiles/contents/app/', |
87 |
... path = '/dir1', relative = True) |
88 |
- >>> b.entry(here + '/tests/testfiles/contents/app/dir1') #doctest: +ELLIPSIS |
89 |
+ b.entry(here + '/tests/testfiles/contents/app/dir1') #doctest: +ELLIPSIS |
90 |
'dir 1 default-owned "dir1" ... 0 ' |
91 |
- >>> b.add('dir', 'default-owned', destination = here + '/tests/testfiles/contents/app', |
92 |
+ b.add('dir', 'default-owned', destination = here + '/tests/testfiles/contents/app', |
93 |
... path = '/dir1', |
94 |
... relative = False) |
95 |
- >>> b.entry(here + '/tests/testfiles/contents/app/dir1') #doctest: +ELLIPSIS |
96 |
+ b.entry(here + '/tests/testfiles/contents/app/dir1') #doctest: +ELLIPSIS |
97 |
'dir 0 default-owned ".../tests/testfiles/contents/app/dir1" ... 0 ' |
98 |
|
99 |
Q: Is the full link to the target what we want? |
100 |
A: Yes, since the link will still be ok even if we move the directory. |
101 |
|
102 |
- >>> b.add('sym', 'virtual', |
103 |
+ b.add('sym', 'virtual', |
104 |
... destination = here + '/tests/testfiles/contents/app/', |
105 |
... path = '/test3', relative = True) |
106 |
- >>> b.entry(here + '/tests/testfiles/contents/app/test3') #doctest: +ELLIPSIS |
107 |
+ b.entry(here + '/tests/testfiles/contents/app/test3') #doctest: +ELLIPSIS |
108 |
'sym 1 virtual "test3" ... 0 .../tests/testfiles/contents/app/test1' |
109 |
|
110 |
- >>> b.db_print() #doctest: +ELLIPSIS |
111 |
+ b.db_print() #doctest: +ELLIPSIS |
112 |
file 1 config-owned "test1" ... d8e8fca2dc0f896fd7cb4cb0031ba249 |
113 |
file 1 config-owned "test2" ... d8e8fca2dc0f896fd7cb4cb0031ba249 |
114 |
sym 1 virtual "test3" ... 0 .../tests/testfiles/contents/app/test1 |