classification
Title: Refactor test_tarfile
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.3, Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: ezio.melotti, lars.gustaebel, pitrou, python-dev, serhiy.storchaka, zach.ware
Priority: normal Keywords: patch

Created on 2013-06-15 14:18 by serhiy.storchaka, last changed 2013-06-17 13:14 by serhiy.storchaka. This issue is now closed.

Files
File name Uploaded Description Edit
test_tarfile.patch serhiy.storchaka, 2013-06-15 14:18 review
Messages (6)
msg191209 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-06-15 14:18
test_tarfile already use parametric classes approach for constructing different tests. The proposed patch extends this approach to generating tests for different compression types.

In additional this patch:

* Makes test_tarfile discoverable.
* Uses more special tests (i.e. assertEqual, assertIs) instead of assertTrue.
* Adds explicit test skips instead of reporting skipped tests as passed.
* Wraps long lines.
msg191231 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2013-06-15 19:47
Looks like a winner, barring a few nits picked on Rietveld.  This issue supersedes issue17689, would anyone mind marking that for me?
msg191276 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-06-16 18:01
Oh, sorry, I missed issue17689.
msg191289 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2013-06-16 21:05
>Serhiy Storchaka added the comment:
>
>Oh, sorry, I missed issue17689.

That's alright, this is a legitimately different issue that just happens to encompass the purpose of the other. As long as your patch hits all the points mine meant to, I'm not bothered :)
msg191329 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-06-17 13:11
New changeset 4b2188b13dd2 by Serhiy Storchaka in branch '3.3':
Issue #18223: Refactor test_tarfile.
http://hg.python.org/cpython/rev/4b2188b13dd2

New changeset 5c0816e64aac by Serhiy Storchaka in branch 'default':
Issue #18223: Refactor test_tarfile.
http://hg.python.org/cpython/rev/5c0816e64aac
msg191330 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-06-17 13:13
Thanks Ezio and Zachary for review. I have included Zachary's patch for issue17689. In addition catching the FileNotFoundError exception used now in test_non_existent_targz_file instead of IOError/OSError + checking errno.
History
Date User Action Args
2013-06-17 13:14:45serhiy.storchakasetassignee: serhiy.storchaka
2013-06-17 13:13:01serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: + msg191330

stage: patch review -> resolved
2013-06-17 13:11:38python-devsetnosy: + python-dev
messages: + msg191329
2013-06-16 21:35:40michael.foordsetnosy: - michael.foord
2013-06-16 21:05:36zach.waresetmessages: + msg191289
2013-06-16 18:01:08serhiy.storchakasetmessages: + msg191276
2013-06-15 19:47:15zach.waresetmessages: + msg191231
2013-06-15 14:18:34serhiy.storchakacreate