[issue1537721] csv module: add header row to DictWriter

Florent Xicluna report at bugs.python.org
Thu Mar 4 19:12:34 CET 2010


Florent Xicluna <florent.xicluna at gmail.com> added the comment:

according to the buidbots, it hurts some platforms: Windows XP, Windows 7 and sparc Solaris10


 * sparc solaris10

test_writerows (test.test_csv.Test_Csv) ... ok

======================================================================
FAIL: test_write_simple_dict (test.test_csv.TestDictFields)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home2/buildbot/slave/trunk.loewis-sun/build/Lib/test/test_csv.py", line 607, in test_write_simple_dict
    self.assertEqual(fileobj.read(), "10,,abc\r\n")
AssertionError: 'f1,f2,f3\r\n' != '10,,abc\r\n'

----------------------------------------------------------------------
Ran 84 tests in 17.335s

FAILED (failures=1)
test test_csv failed -- Traceback (most recent call last):
  File "/home2/buildbot/slave/trunk.loewis-sun/build/Lib/test/test_csv.py", line 607, in test_write_simple_dict
    self.assertEqual(fileobj.read(), "10,,abc\r\n")
AssertionError: 'f1,f2,f3\r\n' != '10,,abc\r\n'

 * x86 XP and x86 Windows7

test_csv
test test_csv failed -- Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\test\test_csv.py", line 604, in test_write_simple_dict
    writer.writerow({"f1": 10, "f3": "abc"})
  File "D:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\csv.py", line 148, in writerow
    return self.writer.writerow(self._dict_to_list(rowdict))
IOError: [Errno 0] Error

----------
nosy: +flox

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1537721>
_______________________________________


More information about the Python-bugs-list mailing list