From 21870d2a1597f1d22fcf27cedc4f4382ff07229f Mon Sep 17 00:00:00 2001 From: Devan Franchini Date: Wed, 1 Jan 2014 22:43:10 -0500 Subject: 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 --- WebappConfig/ebuild.py | 46 +++++++++++++++++++++++----------------------- 1 file 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 ================================================================= POST-INSTALL INSTRUCTIONS @@ -270,7 +270,7 @@ class Ebuild: PVR: 3.0.5 ================================================================= - + " ''' v_root = self.get_config('vhost_root') -- cgit v1.2.3-65-gdbad