Re: Simple Doc Test failing without any reason [Help Needed]
- From: afrobeard <afrobeard@xxxxxxxxx>
- Date: Wed, 28 May 2008 05:47:08 -0700 (PDT)
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')<There were some spaces in these angle brackets>
Apparently they caused the test case to fail on this.
Weird behavior :/
Thanks for your time Gerard and thanks to everyone else too.
On May 28, 5:11 pm, Gerard Flanagan <grflana...@xxxxxxxxx> wrote:
On May 28, 1:48 pm, afrobeard <afrobe...@xxxxxxxxx> 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 and Got looks the same. The value should verify. What am I
doing wrong here ?
Thanks in advance. I really appreciate your time.
P.S. I tested this Python2.5 installed on both Ubuntu Hardy Heron and
Windows XP
Your code works for me (Python 2.5 WinXP).
Are you mixing tabs and spaces?
G.
.
- Follow-Ups:
- References:
- Simple Doc Test failing without any reason [Help Needed]
- From: afrobeard
- Re: Simple Doc Test failing without any reason [Help Needed]
- From: Gerard Flanagan
- Simple Doc Test failing without any reason [Help Needed]
- Prev by Date: Re: Simple Doc Test failing without any reason [Help Needed]
- Next by Date: Re: Flash Decoder
- Previous by thread: Re: Simple Doc Test failing without any reason [Help Needed]
- Next by thread: Traling white space on program source lines (was: Simple Doc Test failing without any reason [Help Needed])
- Index(es):
Relevant Pages
|