Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev

zc.zope3recipes : set offline tests everywhere

 

 

Zope dev RSS feed   Index | Next | Previous | View Threaded


ccomb at free

Aug 9, 2008, 3:18 AM

Post #1 of 6 (477 views)
Permalink
zc.zope3recipes : set offline tests everywhere

Is this change ok?
It seems to solve the previous failures in the 3.4 kgs, and speeds up the test.

> Log message for revision 89568:
> Added offline=true to every test buildout to prevent unexpected (potentially
> recursive) upgrade during tests
>
>
> Changed:
> U zc.zope3recipes/branches/0.6/zc/zope3recipes/README.txt
> U zc.zope3recipes/branches/0.6/zc/zope3recipes/tests.py
>
> -=-
> Modified: zc.zope3recipes/branches/0.6/zc/zope3recipes/README.txt
> ===================================================================
> --- zc.zope3recipes/branches/0.6/zc/zope3recipes/README.txt 2008-08-09 10:09:05 UTC (rev 89567)
> +++ zc.zope3recipes/branches/0.6/zc/zope3recipes/README.txt 2008-08-09 10:10:49 UTC (rev 89568)
> @@ -53,6 +53,7 @@
> ... [buildout]
> ... develop = demo1 demo2
> ... parts = myapp
> + ... offline = true
> ...
> ... [myapp]
> ... recipe = zc.zope3recipes:application
> @@ -145,6 +146,7 @@
> ... [buildout]
> ... develop = demo1 demo2
> ... parts = myapp
> + ... offline = true
> ...
> ... [zope3]
> ... location = %(zope3)s
> @@ -288,6 +290,7 @@
> ... [buildout]
> ... develop = demo1 demo2
> ... parts = myapp
> + ... offline = true
> ...
> ... [zope3]
> ... location = %(zope3)s
> @@ -343,6 +346,7 @@
> ... [buildout]
> ... develop = demo1 demo2
> ... parts = myapp
> + ... offline = true
> ...
> ... [zope3]
> ... location = %(zope3)s
> @@ -450,6 +454,7 @@
> ... [buildout]
> ... develop = demo1 demo2
> ... parts = myapp
> + ... offline = true
> ...
> ... [zope3]
> ... location = %(zope3)s
> @@ -569,6 +574,7 @@
> ... [buildout]
> ... develop = demo1 demo2
> ... parts = instance
> + ... offline = true
> ...
> ... [zope3]
> ... location = %(zope3)s
> @@ -681,6 +687,7 @@
> ... [buildout]
> ... develop = demo1 demo2
> ... parts = instance
> + ... offline = true
> ...
> ... [zope3]
> ... location = %(zope3)s
> @@ -760,6 +767,7 @@
> ... [buildout]
> ... develop = demo1 demo2
> ... parts = instance
> + ... offline = true
> ...
> ... [zope3]
> ... location = %(zope3)s
> @@ -850,6 +858,7 @@
> ... [buildout]
> ... develop = demo1 demo2
> ... parts = instance
> + ... offline = true
> ...
> ... [zope3]
> ... location = %(zope3)s
> @@ -930,6 +939,7 @@
> ... [buildout]
> ... develop = demo1 demo2
> ... parts = instance
> + ... offline = true
> ...
> ... [zope3]
> ... location = %(zope3)s
> @@ -1010,6 +1020,7 @@
> ... [buildout]
> ... develop = demo1 demo2
> ... parts = instance
> + ... offline = true
> ...
> ... [zope3]
> ... location = %(zope3)s
> @@ -1112,6 +1123,7 @@
> ... [buildout]
> ... develop = demo1 demo2
> ... parts = instance
> + ... offline = true
> ...
> ... [zope3]
> ... location = %(zope3)s
> @@ -1211,6 +1223,7 @@
> ... [buildout]
> ... develop = demo1 demo2
> ... parts = instance
> + ... offline = true
> ...
> ... [zope3]
> ... location = %(zope3)s
> @@ -1307,6 +1320,7 @@
> ... [buildout]
> ... develop = demo1 demo2
> ... parts = instance
> + ... offline = true
> ...
> ... [zope3]
> ... location = %(zope3)s
> @@ -1456,6 +1470,7 @@
> ... [buildout]
> ... develop = demo1 demo2
> ... parts = instance
> + ... offline = true
> ...
> ... [zope3]
> ... location = %(zope3)s
> @@ -1597,6 +1612,7 @@
> ... [buildout]
> ... develop = demo1 demo2
> ... parts = instance instance2
> + ... offline = true
> ...
> ... [zope3]
> ... location = %(zope3)s
>
> Modified: zc.zope3recipes/branches/0.6/zc/zope3recipes/tests.py
> ===================================================================
> --- zc.zope3recipes/branches/0.6/zc/zope3recipes/tests.py 2008-08-09 10:09:05 UTC (rev 89567)
> +++ zc.zope3recipes/branches/0.6/zc/zope3recipes/tests.py 2008-08-09 10:10:49 UTC (rev 89568)
> @@ -32,6 +32,7 @@
> ... '''
> ... [buildout]
> ... parts = ctl
> + ... offline = true
> ...
> ... [ctl]
> ... recipe = zc.recipe.egg
> @@ -94,6 +95,7 @@
> ... '''
> ... [buildout]
> ... parts = instance
> + ... offline = true
> ...
> ... [myapp]
> ... location = foo
>
> _______________________________________________
> Checkins mailing list
> Checkins[at]zope.org
> http://mail.zope.org/mailman/listinfo/checkins
>
>

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


wichert at wiggy

Aug 10, 2008, 5:27 AM

Post #2 of 6 (444 views)
Permalink
Re: zc.zope3recipes : set offline tests everywhere [In reply to]

Previously Christophe Combelles wrote:
> Is this change ok?
> It seems to solve the previous failures in the 3.4 kgs, and speeds up the
> test.

To just prevent upgrades you can use 'newest = false'.

Wichert.

--
Wichert Akkerman <wichert[at]wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


chris at simplistix

Aug 11, 2008, 2:17 AM

Post #3 of 6 (437 views)
Permalink
Re: zc.zope3recipes : set offline tests everywhere [In reply to]

Christophe Combelles wrote:
> Is this change ok?
> It seems to solve the previous failures in the 3.4 kgs, and speeds up
> the test.

I don't have a problem with the change, but this damages the usefulness
of README.txt as documentation.

As someone who's never used zope3recipes, I'm going to read that and
wonder why offline = true is in there all the time as there are no
comments or explanation.

Myself, I'd try and find another way of getting offline=true to happen
so that the docs can actually remain actual docs without test cruft
strewn throughout them.

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


jim at zope

Aug 11, 2008, 12:27 PM

Post #4 of 6 (426 views)
Permalink
Re: zc.zope3recipes : set offline tests everywhere [In reply to]

On Aug 11, 2008, at 5:17 AM, Chris Withers wrote:

> Christophe Combelles wrote:
>> Is this change ok?
>> It seems to solve the previous failures in the 3.4 kgs, and speeds
>> up the test.
>
> I don't have a problem with the change, but this damages the
> usefulness of README.txt as documentation.
>
> As someone who's never used zope3recipes, I'm going to read that and
> wonder why offline = true is in there all the time as there are no
> comments or explanation.
>
> Myself, I'd try and find another way of getting offline=true to
> happen so that the docs can actually remain actual docs without test
> cruft strewn throughout them.


I agree.

A sneaky way to do this would be to change the setup code to set a
HOME environment variable to a temporary directory
containing .buildout/default.cfg with:

[buildout]
newest = false

Jim

--
Jim Fulton
Zope Corporation


_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


benji at zope

Aug 11, 2008, 1:44 PM

Post #5 of 6 (426 views)
Permalink
Re: zc.zope3recipes : set offline tests everywhere [In reply to]

On Mon, Aug 11, 2008 at 3:27 PM, Jim Fulton <jim[at]zope.com> wrote:
>
> On Aug 11, 2008, at 5:17 AM, Chris Withers wrote:
>
>> Christophe Combelles wrote:
>>> Is this change ok?
>>> It seems to solve the previous failures in the 3.4 kgs, and speeds
>>> up the test.
>>
>> I don't have a problem with the change, but this damages the
>> usefulness of README.txt as documentation.
>>
>> As someone who's never used zope3recipes, I'm going to read that and
>> wonder why offline = true is in there all the time as there are no
>> comments or explanation.
>>
>> Myself, I'd try and find another way of getting offline=true to
>> happen so that the docs can actually remain actual docs without test
>> cruft strewn throughout them.
>
>
> I agree.
>
> A sneaky way to do this would be to change the setup code to set a
> HOME environment variable to a temporary directory
> containing .buildout/default.cfg with:

I'll throw out another option: you can add doctest examples in reST
comments to enable offline mode. Something like this:

"""
.. Set offline mode so the tests run correctly (or whatever).

>>> DO THING HERE

Now we foo the bar with the baz

>>> baz.foo(bar)
"""

When rendered to HTML (or any other target) the first part won't be
visible, but the second part will be.

If you have to do this much a global approach (like the one Jim
suggested) would likely be better, but I wanted to demonstrate this
approach because it can be useful when you don't want to pollute
otherwise good documentation.
--
Benji York
Senior Software Engineer
Zope Corporation
_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


ccomb at free

Aug 13, 2008, 4:45 PM

Post #6 of 6 (397 views)
Permalink
Re: zc.zope3recipes : set offline tests everywhere [In reply to]

Thanks for the proposals, I've added newest=false in the SetUp, as well as
ellipsis. This seems ok for the 0.6 branch, but not enough for the trunk.

Christophe

Benji York a écrit :
> On Mon, Aug 11, 2008 at 3:27 PM, Jim Fulton <jim[at]zope.com> wrote:
>> On Aug 11, 2008, at 5:17 AM, Chris Withers wrote:
>>
>>> Christophe Combelles wrote:
>>>> Is this change ok?
>>>> It seems to solve the previous failures in the 3.4 kgs, and speeds
>>>> up the test.
>>> I don't have a problem with the change, but this damages the
>>> usefulness of README.txt as documentation.
>>>
>>> As someone who's never used zope3recipes, I'm going to read that and
>>> wonder why offline = true is in there all the time as there are no
>>> comments or explanation.
>>>
>>> Myself, I'd try and find another way of getting offline=true to
>>> happen so that the docs can actually remain actual docs without test
>>> cruft strewn throughout them.
>>
>> I agree.
>>
>> A sneaky way to do this would be to change the setup code to set a
>> HOME environment variable to a temporary directory
>> containing .buildout/default.cfg with:
>
> I'll throw out another option: you can add doctest examples in reST
> comments to enable offline mode. Something like this:
>
> """
> .. Set offline mode so the tests run correctly (or whatever).
>
> >>> DO THING HERE
>
> Now we foo the bar with the baz
>
> >>> baz.foo(bar)
> """
>
> When rendered to HTML (or any other target) the first part won't be
> visible, but the second part will be.
>
> If you have to do this much a global approach (like the one Jim
> suggested) would likely be better, but I wanted to demonstrate this
> approach because it can be useful when you don't want to pollute
> otherwise good documentation.

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Zope dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.