Re: [Zope-dev] Test fixture concepts

2011-04-20 Thread Martijn Faassen
On 03/27/2011 05:13 PM, Martin Aspeli wrote: On 27 March 2011 15:54, Uli Fouquetu...@gnufix.de wrote: The (limited) experiences with py.test, however, were awesome. Some points that are quite cool IMHO: - Easy finding of tests: just write some ``test_function`` in a ``test_module`` and

Re: [Zope-dev] Test fixture concepts

2011-04-20 Thread Martijn Faassen
On 03/29/2011 02:43 PM, Wichert Akkerman wrote: On 3/29/11 14:40 , Stephan Richter wrote: Yeah, Marius led me recently to that path too. Write a narrative in text files and use doc strings of functions to do edge cases (or when you don't have time for the narrative). I am getting used to

Re: [Zope-dev] Test fixture concepts

2011-04-20 Thread Wichert Akkerman
On 2011-4-20 21:59, Martijn Faassen wrote: On 03/29/2011 02:43 PM, Wichert Akkerman wrote: On 3/29/11 14:40 , Stephan Richter wrote: Yeah, Marius led me recently to that path too. Write a narrative in text files and use doc strings of functions to do edge cases (or when you don't have

Re: [Zope-dev] Test fixture concepts

2011-03-29 Thread Jim Fulton
On Mon, Mar 28, 2011 at 5:27 PM, Martin Aspeli optilude+li...@gmail.com wrote: On 28 March 2011 15:45, Tres Seaver tsea...@palladion.com wrote: The vast majority of the doctest testcases in zope.* packages fall into this category:  poor isolation, lots of edge cases which would obscure any

Re: [Zope-dev] Test fixture concepts

2011-03-29 Thread Stephan Richter
On Tuesday, March 29, 2011, Jim Fulton wrote: so I may forgo them. Which is a mistake. You should create separate tests. I typically put large tests, dealing with main use cases where there is a definite flow of activity in '.test' files. I do these in separate files because they're

Re: [Zope-dev] Test fixture concepts

2011-03-29 Thread Wichert Akkerman
On 3/29/11 14:40 , Stephan Richter wrote: On Tuesday, March 29, 2011, Jim Fulton wrote: so I may forgo them. Which is a mistake. You should create separate tests. I typically put large tests, dealing with main use cases where there is a definite flow of activity in '.test' files. I do

Re: [Zope-dev] Test fixture concepts (was: Zope test layers, pytest, and test isolation)

2011-03-28 Thread Benji York
On Sun, Mar 27, 2011 at 10:54 AM, Uli Fouquet u...@gnufix.de wrote: - `assert` works like you would expect it to work in tests. No need  to use `self.assertEqual()`` and friends (but you can if you prefer). How do they deal with the fact that assert statements are dropped when Python is run

Re: [Zope-dev] Test fixture concepts (was: Zope test layers, pytest, and test isolation)

2011-03-28 Thread Uli Fouquet
Hi there, Benji York wrote: On Sun, Mar 27, 2011 at 10:54 AM, Uli Fouquet u...@gnufix.de wrote: - `assert` works like you would expect it to work in tests. No need to use `self.assertEqual()`` and friends (but you can if you prefer). How do they deal with the fact that assert statements

Re: [Zope-dev] Test fixture concepts (was: Zope test layers, pytest, and test isolation)

2011-03-28 Thread Jim Fulton
On Sun, Mar 27, 2011 at 11:13 AM, Martin Aspeli optilude+li...@gmail.com wrote: Hi, On 27 March 2011 15:54, Uli Fouquet u...@gnufix.de wrote: The (limited) experiences with py.test, however, were awesome. Some points that are quite cool IMHO: - Easy finding of tests: just write some

Re: [Zope-dev] Test fixture concepts (was: Zope test layers, pytest, and test isolation)

2011-03-28 Thread Jim Fulton
On Mon, Mar 28, 2011 at 9:33 AM, Uli Fouquet u...@gnufix.de wrote: Hi there, Benji York wrote: On Sun, Mar 27, 2011 at 10:54 AM, Uli Fouquet u...@gnufix.de wrote: - `assert` works like you would expect it to work in tests. No need  to use `self.assertEqual()`` and friends (but you can if

Re: [Zope-dev] Test fixture concepts

2011-03-28 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/28/2011 10:04 AM, Jim Fulton wrote: On Sun, Mar 27, 2011 at 11:13 AM, Martin Aspeli optilude+li...@gmail.com wrote: Hi, On 27 March 2011 15:54, Uli Fouquet u...@gnufix.de wrote: The (limited) experiences with py.test, however, were

Re: [Zope-dev] Test fixture concepts

2011-03-28 Thread Wolfgang Schnerring
Hello, * Martin Aspeli optilude+li...@gmail.com [2011-03-27 16:13]: On 27 March 2011 15:54, Uli Fouquet u...@gnufix.de wrote: The (limited) experiences with py.test, however, were awesome. Some points that are quite cool IMHO: [...] I agree wholeheartedly with what Martin has said about

Re: [Zope-dev] Test fixture concepts

2011-03-28 Thread Wolfgang Schnerring
Hello, * Jim Fulton j...@zope.com [2011-03-28 10:04]: More generally, I'd love to see us adopt another test runner so that we can stop maintianing zope.testrunner. When it was written at the turn of the century, there weren't good alternatives. Personally, I think maintaining it is boring.

Re: [Zope-dev] Test fixture concepts

2011-03-28 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/28/2011 10:56 AM, Wolfgang Schnerring wrote: Hello, * Jim Fulton j...@zope.com [2011-03-28 10:04]: More generally, I'd love to see us adopt another test runner so that we can stop maintianing zope.testrunner. When it was written at the

Re: [Zope-dev] Test fixture concepts

2011-03-28 Thread Martin Aspeli
On 28 March 2011 15:45, Tres Seaver tsea...@palladion.com wrote: The vast majority of the doctest testcases in zope.* packages fall into this category:  poor isolation, lots of edge cases which would obscure any real narrative docs, of which there are almost none.  I believe the conflict is

Re: [Zope-dev] Test fixture concepts (was: Zope test layers, pytest, and test isolation)

2011-03-27 Thread Uli Fouquet
Hi there, I first would like to thank everybody very much for the interesting and elaborated answers to my last questions! I learned a lot about registries and think that for now `plone.testing` (which in fact we hadn't had on the screen) will help to solve some of the most urgent issues we have

Re: [Zope-dev] Test fixture concepts (was: Zope test layers, pytest, and test isolation)

2011-03-27 Thread Martin Aspeli
Hi, On 27 March 2011 15:54, Uli Fouquet u...@gnufix.de wrote: The (limited) experiences with py.test, however, were awesome. Some points that are quite cool IMHO: - Easy finding of tests: just write some ``test_function`` in a  ``test_module`` and it will be found and executed. That also

Re: [Zope-dev] Test fixture concepts (was: Zope test layers, pytest, and test isolation)

2011-03-26 Thread Wolfgang Schnerring
Hello, part two. :) * Uli Fouquet u...@gnufix.de [2011-03-24 01:05]: A big advantage of test layers over `pytest` testing scopes might be that you can spread your tests associated to a certain layer over many files/modules/packages as you like and the setup/teardown will nevertheless only be

Re: [Zope-dev] Test fixture concepts (was: Zope test layers, pytest, and test isolation)

2011-03-26 Thread Martin Aspeli
Hi, On 26 March 2011 14:18, Wolfgang Schnerring w...@gocept.com wrote: Because, while test layers are nice because they have the above properties, I'm not too happy with the current implementation, namely the use (or is it abuse? ;-) of __bases__ and __name__, which leads very naturally to