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/
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?
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@wiggy.net> It is simple to make things. http://www.wiggy.net/ It is hard to make things simple.
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@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
On Thu, May 15, 2008 at 2:10 PM, Christian Theune <ct@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
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@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@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
On Thu, May 15, 2008 at 7:43 AM, Wichert Akkerman <wichert@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
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@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@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
On Fri, May 16, 2008 at 1:31 PM, Christian Theune <ct@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@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@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/
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
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@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/
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
participants (7)
-
Benji York -
Chris McDonough -
Christian Theune -
Jim Fulton -
Philipp von Weitershausen -
Tarek Ziadé -
Wichert Akkerman