[Checkins] SVN: zc.zope3recipes/trunk/ Merge from the 0.6 branch:
Tarek Ziadé
ziade.tarek at gmail.com
Thu Aug 14 03:00:59 EDT 2008
On Thu, Aug 14, 2008 at 12:31 AM, Christophe Combelles <ccomb at free.fr>wrote:
> Log message for revision 89815:
> Merge from the 0.6 branch:
> added newest=false to prevent upgrades during tests
>
>
> Changed:
> U zc.zope3recipes/trunk/README.txt
> U zc.zope3recipes/trunk/zc/zope3recipes/README.txt
> U zc.zope3recipes/trunk/zc/zope3recipes/tests.py
>
> -=-
> Modified: zc.zope3recipes/trunk/README.txt
> ===================================================================
> --- zc.zope3recipes/trunk/README.txt 2008-08-13 22:27:06 UTC (rev 89814)
> +++ zc.zope3recipes/trunk/README.txt 2008-08-13 22:31:19 UTC (rev 89815)
> @@ -16,7 +16,12 @@
>
> Releases
> ********
> +=====================
> +0.6.2dev (unreleased)
> +=====================
>
> +Added the "newest=false" option in the SetUp to prevent upgrade during
> tests
> +
> ==================
> 0.7.0 (2008/02/01)
> ==================
>
> Modified: zc.zope3recipes/trunk/zc/zope3recipes/README.txt
> ===================================================================
> --- zc.zope3recipes/trunk/zc/zope3recipes/README.txt 2008-08-13 22:27:06
> UTC (rev 89814)
> +++ zc.zope3recipes/trunk/zc/zope3recipes/README.txt 2008-08-13 22:31:19
> UTC (rev 89815)
> @@ -46,6 +46,8 @@
> ... setup(name = 'demo2', install_requires='demo1')
> ... ''')
>
> +.. Please note that the "newest=false" option is set in the test SetUp to
> prevent upgrades
> +
> We'll create a buildout.cfg file that defines our application:
>
> >>> write('buildout.cfg',
>
> Modified: zc.zope3recipes/trunk/zc/zope3recipes/tests.py
> ===================================================================
> --- zc.zope3recipes/trunk/zc/zope3recipes/tests.py 2008-08-13 22:27:06
> UTC (rev 89814)
> +++ zc.zope3recipes/trunk/zc/zope3recipes/tests.py 2008-08-13 22:31:19
> UTC (rev 89815)
> @@ -195,6 +195,21 @@
> zc.buildout.testing.install('zdaemon', test)
> zc.buildout.testing.install('ZConfig', test)
> zc.buildout.testing.install('zc.recipe.filestorage', test)
> + # prevent upgrade during test
> + if not os.path.exists(os.environ['HOME']):
> + os.mkdir(os.environ['HOME'])
> + buildout_defaults_dir = os.path.join(os.environ['HOME'],
> + '.buildout')
Notice that this test will not work under Windows. (HOME) You need to use
os.path.expanduser('~') instead
>
> + buildout_defaults_file = os.path.join(buildout_defaults_dir,
> + 'default.cfg')
> + if not os.path.exists(buildout_defaults_dir):
> + os.mkdir(buildout_defaults_dir)
> + if not os.path.exists(buildout_defaults_file):
> + open(buildout_defaults_file, 'w').write(
> + "[buildout]\n"
> + "newest = false")
> + else:
> + raise RuntimeWarning('Unable to set "newest=false" for tests')
>
>
> checker = renormalizing.RENormalizing([
>
> _______________________________________________
> Checkins mailing list
> Checkins at zope.org
> http://mail.zope.org/mailman/listinfo/checkins
>
--
Tarek Ziadé | Association AfPy | www.afpy.org
Blog FR | http://programmation-python.org
Blog EN | http://tarekziade.wordpress.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/checkins/attachments/20080814/0c33a8f0/attachment-0001.html
More information about the Checkins
mailing list