[issue26257] Eliminate buffer_tests.py

2016-04-08 Thread Martin Panter
Martin Panter added the comment: Thanks for you help with this Serhiy. Instead of your fixfillchartype(), I went with special “if self.type2test is bytearray” checks in the common tests. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed

[issue26257] Eliminate buffer_tests.py

2016-04-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 197e1f8b28b7 by Martin Panter in branch '3.5': Issue #26257: Eliminate buffer_tests.py and fix ByteArrayAsStringTest https://hg.python.org/cpython/rev/197e1f8b28b7 New changeset ea598d69b7d3 by Martin Panter in branch 'default': Issue #26257: Merge

[issue26257] Eliminate buffer_tests.py

2016-04-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Nice. > I discovered a flaw in the bytearray tests: most of them don’t actually test > bytearray objects! Good catch! > I adapted the tests from the deleted buffer_tests.py file to override the > relevant tests from string_tests.py, so that we continue to

[issue26257] Eliminate buffer_tests.py

2016-04-06 Thread Martin Panter
Martin Panter added the comment: I discovered a flaw in the bytearray tests: most of them don’t actually test bytearray objects! This is easy to fix in Python 3, and I added a test case to ensure that the arguments are converted to the expected type. However porting this fix to Python 2 was

[issue26257] Eliminate buffer_tests.py

2016-04-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And would be nice to backport these changes to 2.7. This will help backporting new future tests. -- assignee: -> martin.panter stage: patch review -> commit review ___ Python tracker

[issue26257] Eliminate buffer_tests.py

2016-04-04 Thread Martin Panter
Martin Panter added the comment: Okay you convinced me to leave those methods in the same relative position as in your patch. I can sympathize with keeping the Mercurial history small. :) The only disadvantage is a couple extra microseconds wasted doing redundant tests. I will try and work on

[issue26257] Eliminate buffer_tests.py

2016-04-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Unfortunately Mercurial can't handle moving file fragments. The history of these methods will be lost. That is why I prefer the patch with minimal moving. Are there any disadvantages of having test_additional_(r)split() and test_strip() in BaseTest?

[issue26257] Eliminate buffer_tests.py

2016-04-04 Thread Martin Panter
Martin Panter added the comment: I see what you meant about making the diff smaller. However in your patch you also moved three extra methods into BaseTest: test_additional_(r)split() and test_strip(). I prefer to handle these three methods in a separate patch that deals with

[issue26257] Eliminate buffer_tests.py

2016-03-19 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, serhiy.storchaka ___ Python tracker ___

[issue26257] Eliminate buffer_tests.py

2016-03-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks to me that all tests from CommonTest except test_capitalize_nonascii can be merged into BaseTest. A number of tests from MixinStrUnicodeUserStringTest could be applied to bytes and bytearray too. I think we should left only two classes in

[issue26257] Eliminate buffer_tests.py

2016-03-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I meant that the patch can be smaller if move more tests from CommonTest to BaseTest without changing order. Here is smaller patch. -- Added file: http://bugs.python.org/file42216/buffer_tests_2.patch ___ Python

[issue26257] Eliminate buffer_tests.py

2016-03-19 Thread Martin Panter
Martin Panter added the comment: Yes what you say about re-arranging the methods in string_tests.py makes sense to me. There might also be some factorizing possible between specific methods in test_bytes.py and the (currently) string-only test methods. But I would like to handle these as

[issue26257] Eliminate buffer_tests.py

2016-02-01 Thread Martin Panter
New submission from Martin Panter: This sort of follows on from other cleanup of test_bytes.py in Issue 19587. Currently buffer_tests defines one base test class, MixinBytesBufferCommonTests, which is used by test_bytes.py to test bytearray (but not bytes!). However there are other tests

[issue26257] Eliminate buffer_tests.py

2016-02-01 Thread Martin Panter
Martin Panter added the comment: I didn’t end up merging test_ljust/rjust/center() from test_bytes. Those tests are more specific to bytes and bytearray, so they are better left as-is. -- keywords: +patch stage: needs patch -> patch review Added file: