Title: fileinput module unit test coverage improvements
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.3
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brian.curtin Nosy List: brian.curtin, denversc, michael.foord, python-dev
Priority: normal Keywords: patch

Created on 2011-03-14 20:46 by denversc, last changed 2011-03-15 15:51 by python-dev. This issue is now closed.

File name Uploaded Description Edit
fileinput_unittests_v2.patch denversc, 2011-03-14 20:58 added tests for fileinput.close() review
fileinput_unittests_v3.patch denversc, 2011-03-14 21:16 added tests for fileinput.nextfile() review
fileinput_unittests_v5.patch denversc, 2011-03-14 21:48 added tests for fileinput functions lineno, filelineno, fileno, isfirstline, isstdin review
fileinput_unittests_v6.patch denversc, 2011-03-14 22:05 factored out some shared "mock" logic review
fileinput_unittests_v7.patch denversc, 2011-03-14 22:12 added tests for the scenario where files=[] is specified to FileInput.__init__() review
fileinput_unittests_v8.patch denversc, 2011-03-14 22:28 added tests for FileInput.__getitem__() review
fileinput_unittests_v9.patch denversc, 2011-03-14 23:00 added tests for a corner case of FileInput.nextfile() where os.unlink() raises OSError review
fileinput_unittests_v10.patch denversc, 2011-03-15 00:07 added corner case tests when OSError is raised inside FileInput.readline() review
fileinput_unittests_v11.patch denversc, 2011-03-15 00:19 re-implemented commented tests for FileInput's "openhook" review
fileinput_unittests_v12.patch denversc, 2011-03-15 00:34 added test for FileInput.fileno() when _file.fileno() raises ValueError review
fileinput_unittests_v12.patch denversc, 2011-03-15 01:13 added tests for fileinput.hook_compressed() review
fileinput_unittests_v13.patch denversc, 2011-03-15 03:11 added tests for fileinput.hook_encoded() review
Messages (5)
msg130895 - (view) Author: Denver Coneybeare (denversc) * Date: 2011-03-14 20:46
As part of the CPython sprints at PyCon 2011 I am improving the unit test coverage for the fileinput module.  Primarily, this will be adding unit tests for the global functions, which right now are almost completely untested.  I will be adding incremental patches and will update once my work is complete, when the final patch can be committed.
msg130949 - (view) Author: Denver Coneybeare (denversc) * Date: 2011-03-15 03:33
fileinput_unittests_v13.patch is the final patch.  Test coverage increased from 65% to 93% with this patch.  The only code left untested is fileinput._test(), which by its name suggests that testing is not required.
msg130977 - (view) Author: Roundup Robot (python-dev) Date: 2011-03-15 14:29
New changeset f2e04ce75f0b by briancurtin in branch 'default':
Fix #11509. Significantly increase test coverage for fileinput.
msg130978 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2011-03-15 14:31
Many thanks for the patch, Denver!
msg130985 - (view) Author: Roundup Robot (python-dev) Date: 2011-03-15 15:51
New changeset 9448691fe084 by briancurtin in branch 'default':
Add news item for #11509.
Date User Action Args
2011-03-15 15:51:36python-devsetnosy: michael.foord, brian.curtin, denversc, python-dev
messages: + msg130985
2011-03-15 14:31:41brian.curtinsetstatus: open -> closed
nosy: michael.foord, brian.curtin, denversc, python-dev
messages: + msg130978

assignee: brian.curtin
resolution: fixed
stage: resolved
2011-03-15 14:29:59python-devsetnosy: + python-dev
messages: + msg130977
2011-03-15 03:33:29denverscsetnosy: michael.foord, brian.curtin, denversc
messages: + msg130949
2011-03-15 03:11:43denverscsetfiles: + fileinput_unittests_v13.patch
nosy: michael.foord, brian.curtin, denversc
2011-03-15 01:13:09denverscsetfiles: + fileinput_unittests_v12.patch
nosy: michael.foord, brian.curtin, denversc
2011-03-15 00:34:02denverscsetfiles: + fileinput_unittests_v12.patch
nosy: michael.foord, brian.curtin, denversc
2011-03-15 00:19:10denverscsetfiles: + fileinput_unittests_v11.patch
nosy: michael.foord, brian.curtin, denversc
2011-03-15 00:07:07denverscsetfiles: + fileinput_unittests_v10.patch
nosy: michael.foord, brian.curtin, denversc
2011-03-14 23:00:32denverscsetfiles: + fileinput_unittests_v9.patch
nosy: michael.foord, brian.curtin, denversc
2011-03-14 22:28:58denverscsetfiles: + fileinput_unittests_v8.patch
nosy: michael.foord, brian.curtin, denversc
2011-03-14 22:28:05denverscsetfiles: - fileinput_unittests_v1.patch
nosy: michael.foord, brian.curtin, denversc
2011-03-14 22:12:10denverscsetfiles: + fileinput_unittests_v7.patch
nosy: michael.foord, brian.curtin, denversc
2011-03-14 22:05:23denverscsetfiles: + fileinput_unittests_v6.patch
nosy: michael.foord, brian.curtin, denversc
2011-03-14 21:48:40denverscsetfiles: + fileinput_unittests_v5.patch
nosy: michael.foord, brian.curtin, denversc
2011-03-14 21:16:19denverscsetfiles: + fileinput_unittests_v3.patch
nosy: michael.foord, brian.curtin, denversc
2011-03-14 20:58:49denverscsetfiles: + fileinput_unittests_v2.patch
nosy: michael.foord, brian.curtin, denversc
2011-03-14 20:46:37denversccreate