Re: Test fixture concepts

Stephan Richter <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
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 easier to write that way.  I use a '.test' suffix to
> avoid the pretense that these are documentation.  I put edge-case
> tests in small docstrings in testing modules.  I'm not really
> religious about using doctests for this, but I find small edge-case
> doctests easier to read than traditional unit tests. It's possible
> that I'd like py.test tests as much.

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 it. I still much prefer the sort of 
output comparison that doctests/manuel gives me over the assertion language 
that unittest.TestCase requires.

Regards,
Stephan
-- 
Entrepreneur and Software Geek
Google me. "Zope Stephan Richter"
_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.