diff options
author | 2014-01-01 22:43:10 -0500 | |
---|---|---|
committer | 2014-01-24 22:13:30 -0500 | |
commit | 21870d2a1597f1d22fcf27cedc4f4382ff07229f (patch) | |
tree | c2a1922aed1d444a283dccce7d79a396e84928c7 | |
parent | WebappConfig/config.py: Uses maybe_get() function instead of get(). (diff) | |
download | webapp-config-21870d2a1597f1d22fcf27cedc4f4382ff07229f.tar.gz webapp-config-21870d2a1597f1d22fcf27cedc4f4382ff07229f.tar.bz2 webapp-config-21870d2a1597f1d22fcf27cedc4f4382ff07229f.zip |
WebappConfig/ebuild.py: Nulls doctest code in run_var()
Due to the variable nature of the output of the run_var() function it
is unrealistic to create doctest code that will not fail a test. This
is mainly due to the fact that there are particular variables that may
never be the same on any two user's systems. It has been decided that
the best solution would be to simply "comment out" the doctest code
to prevent it from running and causing failures.
X-Gentoo-Bug: 430010
X-Gentoo-Bug-URL: https://bugs.gentoo.org/430010
-rw-r--r-- | WebappConfig/ebuild.py | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/WebappConfig/ebuild.py b/WebappConfig/ebuild.py index 03c0c57..29ec893 100644 --- a/WebappConfig/ebuild.py +++ b/WebappConfig/ebuild.py @@ -201,35 +201,35 @@ class Ebuild: The procedure from above is repeated to set up the default environment: - >>> import WebappConfig.config - >>> config = WebappConfig.config.Config() - >>> config.config.set('USER', 'my_htdocsbase', 'htdocs') - >>> config.config.set('USER', 'pn', 'horde') - >>> config.config.set('USER', 'pvr', '3.0.5') - >>> import os.path - >>> here = os.path.dirname(os.path.realpath(__file__)) - >>> config.config.set('USER', 'my_approot', here + - ... '/tests/testfiles/share-webapps') - >>> my_approot = config.config.get('USER', 'my_approot') - >>> my_appdir = my_approot + "/horde/3.0.5" - >>> config.config.set('USER', 'my_appdir', my_appdir) - >>> config.config.set('USER', 'my_hookscriptsdir', my_appdir + '/hooks') - >>> config.config.set('USER', 'my_cgibinbase', 'cgi-bin') - >>> config.config.set('USER', 'my_errorsbase', 'error') - >>> config.config.set('USER', 'my_iconsbase', 'icons') - >>> config.config.set('USER', 'my_serverconfigdir', '/'.join([my_appdir,'conf'])) - >>> config.config.set('USER', 'my_hostrootdir', '/'.join([my_appdir,'hostroot'])) - >>> config.config.set('USER', 'my_htdocsdir', '/'.join([my_appdir,'htdocs'])) - >>> config.config.set('USER', 'my_sqlscriptsdir', '/'.join([my_appdir,'sqlscripts'])) + ">>> import WebappConfig.config" + ">>> config = WebappConfig.config.Config()" + ">>> config.config.set('USER', 'my_htdocsbase', 'htdocs')" + ">>> config.config.set('USER', 'pn', 'horde')" + ">>> config.config.set('USER', 'pvr', '3.0.5')" + ">>> import os.path" + ">>> here = os.path.dirname(os.path.realpath(__file__))" + ">>> config.config.set('USER', 'my_approot', here +" + "... '/tests/testfiles/share-webapps')" + ">>> my_approot = config.config.get('USER', 'my_approot')" + ">>> my_appdir = my_approot + "/horde/3.0.5"" + ">>> config.config.set('USER', 'my_appdir', my_appdir)" + ">>> config.config.set('USER', 'my_hookscriptsdir', my_appdir + '/hooks')" + ">>> config.config.set('USER', 'my_cgibinbase', 'cgi-bin')" + ">>> config.config.set('USER', 'my_errorsbase', 'error')" + ">>> config.config.set('USER', 'my_iconsbase', 'icons')" + ">>> config.config.set('USER', 'my_serverconfigdir', '/'.join([my_appdir,'conf']))" + ">>> config.config.set('USER', 'my_hostrootdir', '/'.join([my_appdir,'hostroot']))" + ">>> config.config.set('USER', 'my_htdocsdir', '/'.join([my_appdir,'htdocs']))" + ">>> config.config.set('USER', 'my_sqlscriptsdir', '/'.join([my_appdir,'sqlscripts']))" Time to create the ebuild handler: - >>> a = Ebuild(config) + ">>> a = Ebuild(config)" The dummy post-install file should display all the variables that are exported here: - >>> a.show_postinst() #doctest: +ELLIPSIS + ">>> a.show_postinst() #doctest: +ELLIPSIS <BLANKLINE> ================================================================= POST-INSTALL INSTRUCTIONS @@ -270,7 +270,7 @@ class Ebuild: PVR: 3.0.5 <BLANKLINE> ================================================================= - <BLANKLINE> + <BLANKLINE>" ''' v_root = self.get_config('vhost_root') |