Writing tests for the Python bug tracker

2010-03-20 Thread Steven D'Aprano
I have two reported bugs in the bug tracker waiting on tests: http://bugs.python.org/issue8128 http://bugs.python.org/issue4037 Are there any guidelines for writing tests for the standard library and language? I've googled, but found nothing useful: lots of guidelines for writing tests, and of

Re: Writing tests for the Python bug tracker

2010-03-20 Thread Steven D'Aprano
On Sat, 20 Mar 2010 06:23:14 +, Steven D'Aprano wrote: Are there any guidelines for writing tests for the standard library and language? I've googled, but found nothing useful: lots of guidelines for writing tests, and of course I've read PEP 8, but I'm not sure if there are conventions

Re: Writing tests for the Python bug tracker

2010-03-20 Thread exarkun
On 06:52 am, st...@remove-this-cybersource.com.au wrote: but when I try running the test, I get an error: $ python test_unicode_interpolation.py Options: {'delimiter': None} str of options.delimiter = None repr of options.delimiter = None len of options.delimiter Traceback (most recent call

Re: Writing tests for the Python bug tracker

2010-03-20 Thread Steven D'Aprano
On Sat, 20 Mar 2010 07:07:58 +, exarkun wrote: What am I doing wrong? Take a careful look at the stack being reported. Then, think of a better name than test for your file. Doh! *face-palm* I was shadowing the test package with a long forgotten test module. -- Steven --

Re: Writing tests for the Python bug tracker

2010-03-20 Thread Mark Dickinson
On Mar 20, 6:23 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: I have two reported bugs in the bug tracker waiting on tests: http://bugs.python.org/issue8128http://bugs.python.org/issue4037 Are there any guidelines for writing tests for the standard library and language?

Re: Writing tests for the Python bug tracker

2010-03-20 Thread Mark Dickinson
On Mar 20, 6:52 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: I've found this: http://docs.python.org/library/test.html and I've written a small test: $ cat test_unicode_interpolation.py # For testinghttp://bugs.python.org/issue8128 import test.test_support import