[issue17944] Refactor test_zipfile
Roundup Robot added the comment: New changeset bb63f813a00f by Serhiy Storchaka in branch '3.3': Issue #17944: test_zipfile now discoverable and uses subclassing to http://hg.python.org/cpython/rev/bb63f813a00f New changeset 5812a3683402 by Serhiy Storchaka in branch 'default': Issue #17944: test_zipfile now discoverable and uses subclassing to http://hg.python.org/cpython/rev/5812a3683402 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17944] Refactor test_zipfile
Serhiy Storchaka added the comment: This bug should be fixed in 2.7 if it exists. It doesn't exists in 2.7. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17944] Refactor test_zipfile
Serhiy Storchaka added the comment: If there are no objections I'm going to commit the patch soon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17944] Refactor test_zipfile
Zachary Ware added the comment: No complaints here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17944] Refactor test_zipfile
Serhiy Storchaka added the comment: Thank you Terry for review. Here is updated patch addressed Terry's comments. Now random datas for tests generated once per class (generating them once per module will be more cumbersome and will save less time). Arguments for zipfile.open() now generated from a special generator. This simplifies the code and makes possible to determine with what argument test is failed. I don't think subtest() is appropriate here (in any case it is 3.4 only). -- Added file: http://bugs.python.org/file30618/test_zipfile_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17944] Refactor test_zipfile
Serhiy Storchaka added the comment: When applying first Terry's suggestion I found a bug. self.list_gen was a generator and when self.list_gen used second time it was exhausted. As result, some tests were skipped and a bug with concatenating bytes and '\n' was not exposed. This bug should be fixed in 2.7 if it exists. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17944] Refactor test_zipfile
Serhiy Storchaka added the comment: If there are no objection I'm going to commit this patch soon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17944] Refactor test_zipfile
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17944] Refactor test_zipfile
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file30197/test_zipfile_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17944] Refactor test_zipfile
Terry J. Reedy added the comment: As I understand this, the main refactoring is to put the tests duplicated for zlib, bz2, and lzma into a master class that is then subclasses=d for each of the compressors. This looks like a great idea. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17944] Refactor test_zipfile
Serhiy Storchaka added the comment: Yes, the first patch includes only this change (plus some needed regrouping and renaming). The second patch in additional wraps long lines, uses asserts with better error reporting, has better resource management (with operator and addCleanup), and contains other minor changes (see a difference between two patches). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17944] Refactor test_zipfile
New submission from Serhiy Storchaka: Here is a patch which refactors test_zipfile, decreases it's size by 269 lines, makes adding tests for new compression types and new tests for all compression types simpler, and makes test_zipfile discoverable. -- components: Tests files: test_zipfile.patch keywords: patch messages: 188760 nosy: alanmcintyre, ezio.melotti, serhiy.storchaka, zach.ware priority: normal severity: normal stage: patch review status: open title: Refactor test_zipfile type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30182/test_zipfile.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com