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

Mailing List Archive: Zope: Dev

zope.testing console script

 

 

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


ziade.tarek at gmail

May 15, 2008, 4:00 AM

Post #1 of 12 (475 views)
Permalink
zope.testing console script

Hi,

I am comparing nose, py.test and zope.testing, and I realized
zope.testing does not install a console script at
Python level.

it is not really a problem when working with a buildout-centric
approach (thanks to zc.recipe.testrunner),
but how can zope.testing be used with plain Python package ?

Is there any installer available, that would allow running
zope.testing from the shell ?

To advocate zope.testing, I need to be able to demonstrate it can be
used like the other tools available out there :D

If nothing exists, I would like to suggest adding a setuptools console
entry point in zope.testing setup.py file,
to get a python script in the $PYTHON/bin folder, exactly like what
zc.recipe.testrunner does.

It could be called "zope.testrunner" maybe ? (nose= nostests, py.test = py.test)

Regards
Tarek



--
Tarek Ziadé | Association AfPy | www.afpy.org
Blog FR | http://programmation-python.org
Blog EN | http://tarekziade.wordpress.com/
_______________________________________________
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 )


philipp at weitershausen

May 15, 2008, 4:23 AM

Post #2 of 12 (462 views)
Permalink
Re: zope.testing console script [In reply to]

Tarek Ziadé wrote:
> If nothing exists, I would like to suggest adding a setuptools
> console entry point in zope.testing setup.py file, to get a python
> script in the $PYTHON/bin folder, exactly like what
> zc.recipe.testrunner does.

+1

> It could be called "zope.testrunner" maybe ? (nose= nostests, py.test = py.test)

I suppose having it called 'test' (which is our convention) is a bit
arrogant. But calling it 'zope.testrunner' creates the allusion that the
package is called zope.testrunner as well. How about 'run-zope.testing'
or something along those lines?
_______________________________________________
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

May 15, 2008, 4:43 AM

Post #3 of 12 (462 views)
Permalink
Re: zope.testing console script [In reply to]

Previously Tarek Ziadé wrote:
> I am comparing nose, py.test and zope.testing, and I realized
> zope.testing does not install a console script at
> Python level.
>
> it is not really a problem when working with a buildout-centric
> approach (thanks to zc.recipe.testrunner),
> but how can zope.testing be used with plain Python package ?
>
> Is there any installer available, that would allow running
> zope.testing from the shell ?
>
> To advocate zope.testing, I need to be able to demonstrate it can be
> used like the other tools available out there :D

Is there a reason to advocate zope.testing over the others? Would it
perhaps make more sense to use one of the more widely used tools instead
of maintaing our own testing toolkit?

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 )


ct at gocept

May 15, 2008, 5:10 AM

Post #4 of 12 (464 views)
Permalink
Re: zope.testing console script [In reply to]

On Thu, May 15, 2008 at 01:43:05PM +0200, Wichert Akkerman wrote:
> Previously Tarek Ziadé wrote:
> > I am comparing nose, py.test and zope.testing, and I realized
> > zope.testing does not install a console script at
> > Python level.
> >
> > it is not really a problem when working with a buildout-centric
> > approach (thanks to zc.recipe.testrunner),
> > but how can zope.testing be used with plain Python package ?
> >
> > Is there any installer available, that would allow running
> > zope.testing from the shell ?
> >
> > To advocate zope.testing, I need to be able to demonstrate it can be
> > used like the other tools available out there :D
>
> Is there a reason to advocate zope.testing over the others? Would it
> perhaps make more sense to use one of the more widely used tools instead
> of maintaing our own testing toolkit?

For one: the others don't have layers.

--
Christian Theune ˇ ct[at]gocept.com
gocept gmbh & co. kg ˇ forsterstraße 29 ˇ 06112 halle (saale) ˇ germany
http://gocept.com ˇ tel +49 345 1229889 7 ˇ fax +49 345 1229889 1
Zope and Plone consulting and development
_______________________________________________
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 )


chrism at plope

May 15, 2008, 5:11 AM

Post #5 of 12 (464 views)
Permalink
Re: zope.testing console script [In reply to]

Tarek Ziadé wrote:
> Hi,
>
> I am comparing nose, py.test and zope.testing, and I realized
> zope.testing does not install a console script at
> Python level.
>
> it is not really a problem when working with a buildout-centric
> approach (thanks to zc.recipe.testrunner),
> but how can zope.testing be used with plain Python package ?
>
> Is there any installer available, that would allow running
> zope.testing from the shell ?

FWIW, we wrapped it up like this:

http://svn.repoze.org/repoze.zope2/trunk/repoze/zope2/scripts/testrunner.py

(that's the backend for a "zope2testrunner" console script)

- C
_______________________________________________
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 )


ziade.tarek at gmail

May 15, 2008, 5:19 AM

Post #6 of 12 (462 views)
Permalink
Re: zope.testing console script [In reply to]

On Thu, May 15, 2008 at 2:10 PM, Christian Theune <ct[at]gocept.com> wrote:
> On Thu, May 15, 2008 at 01:43:05PM +0200, Wichert Akkerman wrote:
>> Previously Tarek Ziadé wrote:
>> > I am comparing nose, py.test and zope.testing, and I realized
>> > zope.testing does not install a console script at
>> > Python level.
>> >
>> > it is not really a problem when working with a buildout-centric
>> > approach (thanks to zc.recipe.testrunner),
>> > but how can zope.testing be used with plain Python package ?
>> >
>> > Is there any installer available, that would allow running
>> > zope.testing from the shell ?
>> >
>> > To advocate zope.testing, I need to be able to demonstrate it can be
>> > used like the other tools available out there :D
>>
>> Is there a reason to advocate zope.testing over the others? Would it
>> perhaps make more sense to use one of the more widely used tools instead
>> of maintaing our own testing toolkit?

Good question,

I am not through in my comparison work, but the range of features are
quite interesting in zope.testing ihmo, compared to others, and the zope
community is used to it.


>
> For one: the others don't have layers.
>

Yes, and other provides test fixtures at method, class, module and
(nose) package level.

Although, py.test and nose provide a lighter approach where there's no need
to use the unittest base classes, as the tools wraps on the fly any
function, class so there's no need for extra boiler-plate code.

py.test is using an iterator to launch tests immediatly while looking
for them, the script is very fast

This work i am doing is for a book, but I can publish the conclusion here if
it can help making a decision on this.

At this point I think that the work being done by Collin Winter in Python 3K
will lead to a new testing framework in Python/unitest that will be
less Java-oriented
and lighter for test writer.

>From there, the third party libraries will probably be reduced to the
test discovery
part. (I don't think this will be integrated in python but I might be wrong)

My point of view is that zope.testing should evolve a little bit to be usable
naturally from the command line like others, and maybe be more flexible in the
discovering part, by wrapping tests that are not based on TestCase.

This would make a unique testing tool, for the Zope community,
and with a lighter way to write new tests, and with the command-line interface
they are used to since years

Tarek
_______________________________________________
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 )


ziade.tarek at gmail

May 15, 2008, 5:23 AM

Post #7 of 12 (463 views)
Permalink
Re: zope.testing console script [In reply to]

Phillip:
> I suppose having it called 'test' (which is our convention) is a bit arrogant. But calling it 'zope.testrunner' creates the allusion >that the package is called zope.testrunner as well. How about 'run-zope.testing' or something along those lines?

Chris McDonough <chrism[at]plope.com> wrote:
> FWIW, we wrapped it up like this:
>
> http://svn.repoze.org/repoze.zope2/trunk/repoze/zope2/scripts/testrunner.py
>
> (that's the backend for a "zope2testrunner" console script)
>

mmm, what about a shorter name ?

"ztests"

Tarek

--
Tarek Ziadé | Association AfPy | www.afpy.org
Blog FR | http://programmation-python.org
Blog EN | http://tarekziade.wordpress.com/
_______________________________________________
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

May 15, 2008, 5:32 AM

Post #8 of 12 (465 views)
Permalink
Re: zope.testing console script [In reply to]

On Thu, May 15, 2008 at 7:43 AM, Wichert Akkerman <wichert[at]wiggy.net> wrote:
> Is there a reason to advocate zope.testing over the others? Would it
> perhaps make more sense to use one of the more widely used tools instead
> of maintaing our own testing toolkit?

I'd also like for us to adopt one of the more widely used test
runners, but as mentioned in replies, there are some features in
zope.testing that we depend on. If someone were adequately motivated
and had sufficient time (neither of which I have, so I suspect no one
else does either), it would be interesting to attempt to endue another
test runner with the features we need (layers, etc.).
--
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 )


ct at gocept

May 15, 2008, 5:40 AM

Post #9 of 12 (464 views)
Permalink
Re: zope.testing console script [In reply to]

Hi,

On Thu, May 15, 2008 at 02:19:17PM +0200, Tarek Ziadé wrote:
> On Thu, May 15, 2008 at 2:10 PM, Christian Theune <ct[at]gocept.com> wrote:
> > On Thu, May 15, 2008 at 01:43:05PM +0200, Wichert Akkerman wrote:
> >> Previously Tarek Ziadé wrote:
> >> > I am comparing nose, py.test and zope.testing, and I realized
> >> > zope.testing does not install a console script at
> >> > Python level.
> >> >
> >> > it is not really a problem when working with a buildout-centric
> >> > approach (thanks to zc.recipe.testrunner),
> >> > but how can zope.testing be used with plain Python package ?
> >> >
> >> > Is there any installer available, that would allow running
> >> > zope.testing from the shell ?
> >> >
> >> > To advocate zope.testing, I need to be able to demonstrate it can be
> >> > used like the other tools available out there :D
> >>
> >> Is there a reason to advocate zope.testing over the others? Would it
> >> perhaps make more sense to use one of the more widely used tools instead
> >> of maintaing our own testing toolkit?
>
> Good question,
>
> I am not through in my comparison work, but the range of features are
> quite interesting in zope.testing ihmo, compared to others, and the zope
> community is used to it.

Make sure you look at the trunk as well. I did some major refactorings on the
grok sprint.

> Yes, and other provides test fixtures at method, class, module and
> (nose) package level.
>
> Although, py.test and nose provide a lighter approach where there's no need
> to use the unittest base classes, as the tools wraps on the fly any
> function, class so there's no need for extra boiler-plate code.

The refactoring would be able to do that with a plugin.

> py.test is using an iterator to launch tests immediatly while looking
> for them, the script is very fast

Even when gathering thousands of tests, this usually takes less than 1% of the
time that the tests actually take to run. So it's a nice point but not that
important IMHO.

> This work i am doing is for a book, but I can publish the conclusion here if
> it can help making a decision on this.
>
> At this point I think that the work being done by Collin Winter in Python 3K
> will lead to a new testing framework in Python/unitest that will be
> less Java-oriented
> and lighter for test writer.
>
> From there, the third party libraries will probably be reduced to the
> test discovery
> part. (I don't think this will be integrated in python but I might be wrong)

And reporting and integrating debugging tools and ... I guess.

> My point of view is that zope.testing should evolve a little bit to be usable
> naturally from the command line like others, and maybe be more flexible in the
> discovering part, by wrapping tests that are not based on TestCase.

The refactoring should allow this more easily.

Christian

--
Christian Theune ˇ ct[at]gocept.com
gocept gmbh & co. kg ˇ forsterstraße 29 ˇ 06112 halle (saale) ˇ germany
http://gocept.com ˇ tel +49 345 1229889 7 ˇ fax +49 345 1229889 1
Zope and Plone consulting and development
_______________________________________________
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

May 15, 2008, 6:23 AM

Post #10 of 12 (463 views)
Permalink
Re: zope.testing console script [In reply to]

On May 15, 2008, at 7:00 AM, Tarek Ziadé wrote:
> I am comparing nose, py.test and zope.testing, and I realized
> zope.testing does not install a console script at
> Python level.

That's a bug.


> If nothing exists, I would like to suggest adding a setuptools console
> entry point in zope.testing setup.py file,
> to get a python script in the $PYTHON/bin folder, exactly like what
> zc.recipe.testrunner does.

+1

> It could be called "zope.testrunner" maybe ? (nose= nostests,
> py.test = py.test)


too long.

I vote for "test" or "runtest".

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 )


ct at gocept

May 16, 2008, 4:31 AM

Post #11 of 12 (410 views)
Permalink
Re: zope.testing console script [In reply to]

On Thu, May 15, 2008 at 08:32:28AM -0400, Benji York wrote:
> On Thu, May 15, 2008 at 7:43 AM, Wichert Akkerman <wichert[at]wiggy.net> wrote:
> > Is there a reason to advocate zope.testing over the others? Would it
> > perhaps make more sense to use one of the more widely used tools instead
> > of maintaing our own testing toolkit?
>
> I'd also like for us to adopt one of the more widely used test
> runners, but as mentioned in replies, there are some features in
> zope.testing that we depend on. If someone were adequately motivated
> and had sufficient time (neither of which I have, so I suspect no one
> else does either), it would be interesting to attempt to endue another
> test runner with the features we need (layers, etc.).

I like our test runner and spent time refactoring it so we can actually start
making changes again. I looked at other test runners (nose, py.test) and
didn't find anything compelling (to me) that we didn't already have.

Christian

--
Christian Theune ˇ ct[at]gocept.com
gocept gmbh & co. kg ˇ forsterstraße 29 ˇ 06112 halle (saale) ˇ germany
http://gocept.com ˇ tel +49 345 1229889 7 ˇ fax +49 345 1229889 1
Zope and Plone consulting and development
_______________________________________________
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 )


ziade.tarek at gmail

May 20, 2008, 3:24 AM

Post #12 of 12 (324 views)
Permalink
Re: zope.testing console script [In reply to]

On Fri, May 16, 2008 at 1:31 PM, Christian Theune <ct[at]gocept.com> wrote:

> On Thu, May 15, 2008 at 08:32:28AM -0400, Benji York wrote:
> > On Thu, May 15, 2008 at 7:43 AM, Wichert Akkerman <wichert[at]wiggy.net>
> wrote:
> > > Is there a reason to advocate zope.testing over the others? Would it
> > > perhaps make more sense to use one of the more widely used tools
> instead
> > > of maintaing our own testing toolkit?
> >
> > I'd also like for us to adopt one of the more widely used test
> > runners, but as mentioned in replies, there are some features in
> > zope.testing that we depend on. If someone were adequately motivated
> > and had sufficient time (neither of which I have, so I suspect no one
> > else does either), it would be interesting to attempt to endue another
> > test runner with the features we need (layers, etc.).
>
> I like our test runner and spent time refactoring it so we can actually
> start
> making changes again. I looked at other test runners (nose, py.test) and
> didn't find anything compelling (to me) that we didn't already have.
>
> Christian
>

I am on Christian's side here: zope.testing is a great tool, used by many
people,
and with strong features,

it looks like it does not need a lot of work to be usable without a buildout
environment,
and to have modern features nose and py.test provides.

At least :

1. the console script (I'll add that in the trunk asap in any case)
2. being able to write tests without subclassing TestCase, in functions and
classes (regexp based+ wrapping)
3. being able to create suites without any extra boiler-plate code, like
nose does (afaik)

Christian, are you willing to work on 2. and 3. ?

++
Tarek



>
> --
> Christian Theune ˇ ct[at]gocept.com
> gocept gmbh & co. kg ˇ forsterstraße 29 ˇ 06112 halle (saale) ˇ germany
> http://gocept.com ˇ tel +49 345 1229889 7 ˇ fax +49 345 1229889 1
> Zope and Plone consulting and development
>



--
Tarek Ziadé | Association AfPy | www.afpy.org
Blog FR | http://programmation-python.org
Blog EN | http://tarekziade.wordpress.com/

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.