<div dir="ltr"><br><br><div class="gmail_quote">On Thu, Aug 14, 2008 at 12:31 AM, Christophe Combelles <span dir="ltr"><<a href="mailto:ccomb@free.fr">ccomb@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Log message for revision 89815:<br>
Merge from the 0.6 branch:<br>
added newest=false to prevent upgrades during tests<br>
<br>
<br>
Changed:<br>
U zc.zope3recipes/trunk/README.txt<br>
U zc.zope3recipes/trunk/zc/zope3recipes/README.txt<br>
U zc.zope3recipes/trunk/zc/zope3recipes/tests.py<br>
<br>
-=-<br>
Modified: zc.zope3recipes/trunk/README.txt<br>
===================================================================<br>
--- zc.zope3recipes/trunk/README.txt 2008-08-13 22:27:06 UTC (rev 89814)<br>
+++ zc.zope3recipes/trunk/README.txt 2008-08-13 22:31:19 UTC (rev 89815)<br>
@@ -16,7 +16,12 @@<br>
<br>
Releases<br>
********<br>
+=====================<br>
+0.6.2dev (unreleased)<br>
+=====================<br>
<br>
+Added the "newest=false" option in the SetUp to prevent upgrade during tests<br>
+<br>
==================<br>
0.7.0 (2008/02/01)<br>
==================<br>
<br>
Modified: zc.zope3recipes/trunk/zc/zope3recipes/README.txt<br>
===================================================================<br>
--- zc.zope3recipes/trunk/zc/zope3recipes/README.txt 2008-08-13 22:27:06 UTC (rev 89814)<br>
+++ zc.zope3recipes/trunk/zc/zope3recipes/README.txt 2008-08-13 22:31:19 UTC (rev 89815)<br>
@@ -46,6 +46,8 @@<br>
... setup(name = 'demo2', install_requires='demo1')<br>
... ''')<br>
<br>
+.. Please note that the "newest=false" option is set in the test SetUp to prevent upgrades<br>
+<br>
We'll create a buildout.cfg file that defines our application:<br>
<br>
>>> write('buildout.cfg',<br>
<br>
Modified: zc.zope3recipes/trunk/zc/zope3recipes/tests.py<br>
===================================================================<br>
--- zc.zope3recipes/trunk/zc/zope3recipes/tests.py 2008-08-13 22:27:06 UTC (rev 89814)<br>
+++ zc.zope3recipes/trunk/zc/zope3recipes/tests.py 2008-08-13 22:31:19 UTC (rev 89815)<br>
@@ -195,6 +195,21 @@<br>
zc.buildout.testing.install('zdaemon', test)<br>
zc.buildout.testing.install('ZConfig', test)<br>
zc.buildout.testing.install('zc.recipe.filestorage', test)<br>
+ # prevent upgrade during test<br>
+ if not os.path.exists(os.environ['HOME']):<br>
+ os.mkdir(os.environ['HOME'])<br>
+ buildout_defaults_dir = os.path.join(os.environ['HOME'],<br>
+ '.buildout')</blockquote><div><br>Notice that this test will not work under Windows. (HOME) You need to use<br><br>os.path.expanduser('~') instead<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
+ buildout_defaults_file = os.path.join(buildout_defaults_dir,<br>
+ 'default.cfg')<br>
+ if not os.path.exists(buildout_defaults_dir):<br>
+ os.mkdir(buildout_defaults_dir)<br>
+ if not os.path.exists(buildout_defaults_file):<br>
+ open(buildout_defaults_file, 'w').write(<br>
+ "[buildout]\n"<br>
+ "newest = false")<br>
+ else:<br>
+ raise RuntimeWarning('Unable to set "newest=false" for tests')<br>
<br>
<br>
checker = renormalizing.RENormalizing([<br>
<br>
_______________________________________________<br>
Checkins mailing list<br>
<a href="mailto:Checkins@zope.org">Checkins@zope.org</a><br>
<a href="http://mail.zope.org/mailman/listinfo/checkins" target="_blank">http://mail.zope.org/mailman/listinfo/checkins</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Tarek Ziadé | Association AfPy | <a href="http://www.afpy.org">www.afpy.org</a><br>Blog FR | <a href="http://programmation-python.org">http://programmation-python.org</a><br>
Blog EN | <a href="http://tarekziade.wordpress.com/">http://tarekziade.wordpress.com/</a><br>
</div>