Gentoo Archives: gentoo-commits

From: Devan Franchini <twitch153@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/webapp-config:master commit in: WebappConfig/
Date: Sat, 25 Jan 2014 03:15:06
Message-Id: 1390619610.21870d2a1597f1d22fcf27cedc4f4382ff07229f.twitch153@gentoo
1 commit: 21870d2a1597f1d22fcf27cedc4f4382ff07229f
2 Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 2 03:43:10 2014 +0000
4 Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 25 03:13:30 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/webapp-config.git;a=commit;h=21870d2a
7
8 WebappConfig/ebuild.py: Nulls doctest code in run_var()
9
10 Due to the variable nature of the output of the run_var() function it
11 is unrealistic to create doctest code that will not fail a test. This
12 is mainly due to the fact that there are particular variables that may
13 never be the same on any two user's systems. It has been decided that
14 the best solution would be to simply "comment out" the doctest code
15 to prevent it from running and causing failures.
16
17 X-Gentoo-Bug: 430010
18 X-Gentoo-Bug-URL: https://bugs.gentoo.org/430010
19
20 ---
21 WebappConfig/ebuild.py | 46 +++++++++++++++++++++++-----------------------
22 1 file changed, 23 insertions(+), 23 deletions(-)
23
24 diff --git a/WebappConfig/ebuild.py b/WebappConfig/ebuild.py
25 index 03c0c57..29ec893 100644
26 --- a/WebappConfig/ebuild.py
27 +++ b/WebappConfig/ebuild.py
28 @@ -201,35 +201,35 @@ class Ebuild:
29 The procedure from above is repeated to set up the default
30 environment:
31
32 - >>> import WebappConfig.config
33 - >>> config = WebappConfig.config.Config()
34 - >>> config.config.set('USER', 'my_htdocsbase', 'htdocs')
35 - >>> config.config.set('USER', 'pn', 'horde')
36 - >>> config.config.set('USER', 'pvr', '3.0.5')
37 - >>> import os.path
38 - >>> here = os.path.dirname(os.path.realpath(__file__))
39 - >>> config.config.set('USER', 'my_approot', here +
40 - ... '/tests/testfiles/share-webapps')
41 - >>> my_approot = config.config.get('USER', 'my_approot')
42 - >>> my_appdir = my_approot + "/horde/3.0.5"
43 - >>> config.config.set('USER', 'my_appdir', my_appdir)
44 - >>> config.config.set('USER', 'my_hookscriptsdir', my_appdir + '/hooks')
45 - >>> config.config.set('USER', 'my_cgibinbase', 'cgi-bin')
46 - >>> config.config.set('USER', 'my_errorsbase', 'error')
47 - >>> config.config.set('USER', 'my_iconsbase', 'icons')
48 - >>> config.config.set('USER', 'my_serverconfigdir', '/'.join([my_appdir,'conf']))
49 - >>> config.config.set('USER', 'my_hostrootdir', '/'.join([my_appdir,'hostroot']))
50 - >>> config.config.set('USER', 'my_htdocsdir', '/'.join([my_appdir,'htdocs']))
51 - >>> config.config.set('USER', 'my_sqlscriptsdir', '/'.join([my_appdir,'sqlscripts']))
52 + ">>> import WebappConfig.config"
53 + ">>> config = WebappConfig.config.Config()"
54 + ">>> config.config.set('USER', 'my_htdocsbase', 'htdocs')"
55 + ">>> config.config.set('USER', 'pn', 'horde')"
56 + ">>> config.config.set('USER', 'pvr', '3.0.5')"
57 + ">>> import os.path"
58 + ">>> here = os.path.dirname(os.path.realpath(__file__))"
59 + ">>> config.config.set('USER', 'my_approot', here +"
60 + "... '/tests/testfiles/share-webapps')"
61 + ">>> my_approot = config.config.get('USER', 'my_approot')"
62 + ">>> my_appdir = my_approot + "/horde/3.0.5""
63 + ">>> config.config.set('USER', 'my_appdir', my_appdir)"
64 + ">>> config.config.set('USER', 'my_hookscriptsdir', my_appdir + '/hooks')"
65 + ">>> config.config.set('USER', 'my_cgibinbase', 'cgi-bin')"
66 + ">>> config.config.set('USER', 'my_errorsbase', 'error')"
67 + ">>> config.config.set('USER', 'my_iconsbase', 'icons')"
68 + ">>> config.config.set('USER', 'my_serverconfigdir', '/'.join([my_appdir,'conf']))"
69 + ">>> config.config.set('USER', 'my_hostrootdir', '/'.join([my_appdir,'hostroot']))"
70 + ">>> config.config.set('USER', 'my_htdocsdir', '/'.join([my_appdir,'htdocs']))"
71 + ">>> config.config.set('USER', 'my_sqlscriptsdir', '/'.join([my_appdir,'sqlscripts']))"
72
73 Time to create the ebuild handler:
74
75 - >>> a = Ebuild(config)
76 + ">>> a = Ebuild(config)"
77
78 The dummy post-install file should display all the variables
79 that are exported here:
80
81 - >>> a.show_postinst() #doctest: +ELLIPSIS
82 + ">>> a.show_postinst() #doctest: +ELLIPSIS
83 <BLANKLINE>
84 =================================================================
85 POST-INSTALL INSTRUCTIONS
86 @@ -270,7 +270,7 @@ class Ebuild:
87 PVR: 3.0.5
88 <BLANKLINE>
89 =================================================================
90 - <BLANKLINE>
91 + <BLANKLINE>"
92 '''
93
94 v_root = self.get_config('vhost_root')