[Csv] [Python-Dev] These csv test cases seem incorrect to me...

Andrew McNamara andrewm at object-craft.com.au
Mon Mar 12 03:41:40 CET 2007


>I decided it would be worthwhile to have a csv module written in Python (no
>C underpinnings) for a number of reasons:

Several other people have already done this. I will forward you their
e-mail address in a separate private e-mail.

>I'm far from having anything which will pass the current test suite, but in
>diagnosing some of my current failures I noticed a couple test cases which
>seem wrong.  In the TestDialectExcel class I see these two questionable
>tests:
>
>    def test_quotes_and_more(self):
>        self.readerAssertEqual('"a"b', [['ab']])
>
>    def test_quote_and_quote(self):
>        self.readerAssertEqual('"a" "b"', [['a "b"']])
[...]
>Any ideas about why these test cases are in there?  I can't imagine Excel
>generating either one.

The point was to produce the same results as Excel. Sure, Excel probably
doesn't generate crap like this itself, but 3rd parties do, and people
complain if we don't parse it just like Excel (sigh).

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/


More information about the Csv mailing list