Writing tests for the Python bug tracker

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Sat Mar 20 08:07:58 CET 2010


On 06:52 am, steve at 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 last):
>  File "test_unicode_interpolation.py", line 3, in <module>
>    import test.test_support
>  File "/home/steve/python/test.py", line 8, in <module>
>    print "len of options.delimiter", len(options.delimiter)
>TypeError: object of type 'NoneType' has no len()
>
>
>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.

Jean-Paul



More information about the Python-list mailing list