Issue 18727: test for writing dictionary rows to CSV (original) (raw)

Created on 2013-08-13 16:01 by mjehanzeb, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue18727.patch mjehanzeb,2013-08-13 16:08 test for writing dictionary rows to CSV
issue18727_v2.patch mjehanzeb,2013-08-14 20:11
issue18727_v3.patch mjehanzeb,2013-08-19 01:26 update using StringIO.getvalue()
Messages (7)
msg195083 - (view) Author: Muhammad Jehanzeb (mjehanzeb) * Date: 2013-08-13 16:01
Test for writing dictionary rows to further enhance the test coverage of CSV lib.
msg195144 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-08-14 12:33
You can probably use a StringIO for the file object, no need to create a temporary file.
msg195211 - (view) Author: Muhammad Jehanzeb (mjehanzeb) * Date: 2013-08-14 20:11
Thanks Antoine, Attached is the updated version of patch using StringIO
msg195270 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-08-15 18:27
Thanks. One more question: is there a reason you don't simply call getvalue() at the end (rather than seek(0) followed by several readline() calls)?
msg195592 - (view) Author: Muhammad Jehanzeb (mjehanzeb) * Date: 2013-08-19 01:26
Sure. Thanks for the comment. I was just trying to be consistent with other tests. However, I updated the patch based on your recommendation. Please have a look at the latest one.
msg217454 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-04-28 23:58
New changeset 2502843dbedf by Antoine Pitrou in branch 'default': Issue #18727: improve test coverage of the csv module by testing for DictWriter.writerows. http://hg.python.org/cpython/rev/2502843dbedf
msg217455 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-04-28 23:59
Hi Muhammad, Sorry, I had forgotten about this issue. I have now committed the patch to 3.5. Thanks for your contribution!
History
Date User Action Args
2022-04-11 14:57:49 admin set github: 62927
2014-04-28 23:59:31 pitrou set status: open -> closedversions: + Python 3.5, - Python 3.4messages: + resolution: fixedstage: patch review -> resolved
2014-04-28 23:58:41 python-dev set nosy: + python-devmessages: +
2013-08-19 01:26:27 mjehanzeb set files: + issue18727_v3.patchmessages: +
2013-08-15 18:27:24 pitrou set messages: +
2013-08-14 20:11:24 mjehanzeb set files: + issue18727_v2.patchmessages: +
2013-08-14 12:33:00 pitrou set versions: + Python 3.4, - Python 3.3nosy: + pitroumessages: + stage: patch review
2013-08-13 16:08:12 mjehanzeb set files: + issue18727.patchkeywords: + patch
2013-08-13 16:01:15 mjehanzeb create