Traling white space on program source lines (was: Simple Doc Test failing without any reason [Help Needed])

2008-05-28 Thread Ben Finney
afrobeard <[EMAIL PROTECTED]> writes: > >>> sanitize_number('0321-4683113') >>> brackets> > > Apparently they caused the test case to fail on this. > > Weird behavior :/ Nope, exactly as specified: doctest is reporting differences berween what output was generated and what output you described.

Re: Simple Doc Test failing without any reason [Help Needed]

2008-05-28 Thread afrobeard
I copied the text off here into a new file and it worked!. I then took a diff between the version that didnt work and the version that worked and the only difference was a couple of spaces after this line:- >>> sanitize_number('0321-4683113')>> brackets> Apparently they caused the test case to f

Re: Simple Doc Test failing without any reason [Help Needed]

2008-05-28 Thread Gerard Flanagan
On May 28, 1:48 pm, afrobeard <[EMAIL PROTECTED]> wrote: > The following following code fails with the failiure:- > > File "test.py", line 27, in __main__.sanitize_number > Failed example: > sanitize_number('0321-4683113') > Expected: > '03214683113' > Got: > '03214683113' > > Expected

Simple Doc Test failing without any reason [Help Needed]

2008-05-28 Thread afrobeard
The following following code fails with the failiure:- File "test.py", line 27, in __main__.sanitize_number Failed example: sanitize_number('0321-4683113') Expected: '03214683113' Got: '03214683113' Expected and Got looks the same. The value should verify. What am I doing wrong her