<div dir="ltr"><br><br><div class="gmail_quote">On Thu, Aug 14, 2008 at 12:31 AM, Christophe Combelles <span dir="ltr">&lt;<a href="mailto:ccomb@free.fr">ccomb@free.fr</a>&gt;</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>
 &nbsp;Merge from the 0.6 branch:<br>
 &nbsp;added newest=false to prevent upgrades during tests<br>
<br>
<br>
Changed:<br>
 &nbsp;U &nbsp; zc.zope3recipes/trunk/README.txt<br>
 &nbsp;U &nbsp; zc.zope3recipes/trunk/zc/zope3recipes/README.txt<br>
 &nbsp;U &nbsp; zc.zope3recipes/trunk/zc/zope3recipes/tests.py<br>
<br>
-=-<br>
Modified: zc.zope3recipes/trunk/README.txt<br>
===================================================================<br>
--- zc.zope3recipes/trunk/README.txt &nbsp; &nbsp;2008-08-13 22:27:06 UTC (rev 89814)<br>
+++ zc.zope3recipes/trunk/README.txt &nbsp; &nbsp;2008-08-13 22:31:19 UTC (rev 89815)<br>
@@ -16,7 +16,12 @@<br>
<br>
&nbsp;Releases<br>
&nbsp;********<br>
+=====================<br>
+0.6.2dev (unreleased)<br>
+=====================<br>
<br>
+Added the &quot;newest=false&quot; option in the SetUp to prevent upgrade during tests<br>
+<br>
&nbsp;==================<br>
&nbsp;0.7.0 (2008/02/01)<br>
&nbsp;==================<br>
<br>
Modified: zc.zope3recipes/trunk/zc/zope3recipes/README.txt<br>
===================================================================<br>
--- zc.zope3recipes/trunk/zc/zope3recipes/README.txt &nbsp; &nbsp;2008-08-13 22:27:06 UTC (rev 89814)<br>
+++ zc.zope3recipes/trunk/zc/zope3recipes/README.txt &nbsp; &nbsp;2008-08-13 22:31:19 UTC (rev 89815)<br>
@@ -46,6 +46,8 @@<br>
 &nbsp; &nbsp; ... setup(name = &#39;demo2&#39;, install_requires=&#39;demo1&#39;)<br>
 &nbsp; &nbsp; ... &#39;&#39;&#39;)<br>
<br>
+.. Please note that the &quot;newest=false&quot; option is set in the test SetUp to prevent upgrades<br>
+<br>
&nbsp;We&#39;ll create a buildout.cfg file that defines our application:<br>
<br>
 &nbsp; &nbsp; &gt;&gt;&gt; write(&#39;buildout.cfg&#39;,<br>
<br>
Modified: zc.zope3recipes/trunk/zc/zope3recipes/tests.py<br>
===================================================================<br>
--- zc.zope3recipes/trunk/zc/zope3recipes/tests.py &nbsp; &nbsp; &nbsp;2008-08-13 22:27:06 UTC (rev 89814)<br>
+++ zc.zope3recipes/trunk/zc/zope3recipes/tests.py &nbsp; &nbsp; &nbsp;2008-08-13 22:31:19 UTC (rev 89815)<br>
@@ -195,6 +195,21 @@<br>
 &nbsp; &nbsp; zc.buildout.testing.install(&#39;zdaemon&#39;, test)<br>
 &nbsp; &nbsp; zc.buildout.testing.install(&#39;ZConfig&#39;, test)<br>
 &nbsp; &nbsp; zc.buildout.testing.install(&#39;zc.recipe.filestorage&#39;, test)<br>
+ &nbsp; &nbsp;# prevent upgrade during test<br>
+ &nbsp; &nbsp;if not os.path.exists(os.environ[&#39;HOME&#39;]):<br>
+ &nbsp; &nbsp; &nbsp; &nbsp;os.mkdir(os.environ[&#39;HOME&#39;])<br>
+ &nbsp; &nbsp;buildout_defaults_dir = os.path.join(os.environ[&#39;HOME&#39;],<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;.buildout&#39;)</blockquote><div><br>Notice that this test will not work under Windows. (HOME) You need to use<br><br>os.path.expanduser(&#39;~&#39;) instead<br>&nbsp; <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>
+ &nbsp; &nbsp;buildout_defaults_file = os.path.join(buildout_defaults_dir,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;default.cfg&#39;)<br>
+ &nbsp; &nbsp;if not os.path.exists(buildout_defaults_dir):<br>
+ &nbsp; &nbsp; &nbsp; &nbsp;os.mkdir(buildout_defaults_dir)<br>
+ &nbsp; &nbsp;if not os.path.exists(buildout_defaults_file):<br>
+ &nbsp; &nbsp; &nbsp; &nbsp;open(buildout_defaults_file, &#39;w&#39;).write(<br>
+ &nbsp; &nbsp; &nbsp; &nbsp;&quot;[buildout]\n&quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp;&quot;newest = false&quot;)<br>
+ &nbsp; &nbsp;else:<br>
+ &nbsp; &nbsp; &nbsp; &nbsp;raise RuntimeWarning(&#39;Unable to set &quot;newest=false&quot; for tests&#39;)<br>
<br>
<br>
&nbsp;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>