[Zope3-dev] Re: [Zope-Checkins] CVS: Zope3/src/persistent/tests
- test_persistent.py:1.5 persistent.txt:1.2
Jim Fulton
jim at zope.com
Mon Mar 8 12:29:13 EST 2004
Marius Gedminas wrote:
> On Mon, Mar 08, 2004 at 09:24:21AM -0500, Jim Fulton wrote:
>
>>>What's wrong with docstrings in unit tests?
>>
>>The docstrings aren't interspuursed with the code.
>>
>>Bonus, the unittest uses docstrings, if present, in test reports,
>>which usually makes it hard to tell what test was being run.
>
>
> You can easily disable this feature of unittest by passing a
> descriptions=False argument to ImmediateTestRunner.
Cool
>
>>As a
>>result, we specifically ask people *not* to write doc strings for
>>test methods.
>
>
> Wouldn't it be better to make the test runner ignore them and then
> actually encourage people to write doc strings if they make unit tests
> easier to read and understand?
>
> Should I commit the following patch?
>
> --- test.py 20 Feb 2004 16:56:40 -0000 1.85
> +++ test.py 8 Mar 2004 16:59:26 -0000
> @@ -617,7 +617,8 @@
>
> def runner(files, test_filter, debug):
> runner = ImmediateTestRunner(verbosity=VERBOSE, debug=debug,
> - progress=progress, profile=profile)
> + progress=progress, profile=profile,
> + descriptions=False)
> suite = unittest.TestSuite()
> for file in files:
> s = get_suite(file)
Sure.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list