Title: test failures in
Type: Severity: normal
Components: Library Versions: Jython 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: amak, fwierzbicki, zyasoft
Priority: Keywords: test failure causes

Created on 2012-03-20.17:57:27 by fwierzbicki, last changed 2014-05-21.23:49:55 by zyasoft.

msg6926 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2012-03-20.17:57:27
see FIXMEs in
msg7656 (view) Author: Alan Kennedy (amak) Date: 2013-02-10.14:24:09
Some of these test case failures are caused by passing a start value != 1 to the adler32 method. Since does not support start values, these tests cannot pass with the current jython implementation.

I have separated out these tests so that

A: Tests that can pass on jython are not skipped
B: Tests that cannot pass on jython are still skipped

The jython documentation for the zlib module should also be updated to note that a start value other than 1 is not supported on jython.
msg7657 (view) Author: Alan Kennedy (amak) Date: 2013-02-10.14:42:00
Other failures in this test are because they test an inconsistency in cpython, between the zlib.decompress function (which does not accept incomplete streams) and the zlib.decompressobj().decompress method (which does accept incomplete streams).

I have re-enabled the test for jython, but placed an if clause within it to prevent testing for cpython's inconsistent behaviour.

(There is a detailed comment in the code to this effect)
msg7658 (view) Author: Alan Kennedy (amak) Date: 2013-02-10.15:53:17
The tests based on check_big_decompress_buffer do not hang for me, even though they are marked as skipped on jython, because "they hang on jython".

I have checked in some comments to this effect, but made no functional changes.

We should track on which platforms these tests do actually hang.

As noted in the comments, the tests are misleading, because they appear to be testing for compressing and then decompressing data of size 1G + 1M. But the decorator wrapping these tests modifies this value to 5147, based on the value of test_support.real_max_memuse
msg7662 (view) Author: Alan Kennedy (amak) Date: 2013-02-11.04:12:54
I have unskipped the check_big_compress_buffer test, which was caused by hex string formatting taking an extremely long time.

More details on 

%x hex formatting takes O(N^2) time.
msg7663 (view) Author: Alan Kennedy (amak) Date: 2013-02-11.04:15:18
Changeset for last message
msg7664 (view) Author: Alan Kennedy (amak) Date: 2013-02-11.04:26:18
I think we're getting close to closing this one Frank.

If we can get the hex formatting issue resolved (i.e. use a better algorithm for hex formatting), then we can restore the original cpython code path.
msg7716 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-20.00:45:11
Alan: nice!
msg8507 (view) Author: Jim Baker (zyasoft) Date: 2014-05-21.23:49:55
test_zlip passes now with the known skips Alan placed, so I'm marking this as closed
Date User Action Args
2014-05-21 23:49:55zyasoftsetstatus: open -> closed
resolution: fixed
messages: + msg8507
nosy: + zyasoft
2013-02-20 00:45:17fwierzbickisetversions: + Jython 2.7, - 2.7a1
2013-02-20 00:45:11fwierzbickisetmessages: + msg7716
2013-02-11 04:26:18amaksetmessages: + msg7664
2013-02-11 04:15:18amaksetmessages: + msg7663
2013-02-11 04:12:54amaksetmessages: + msg7662
2013-02-10 15:53:17amaksetmessages: + msg7658
2013-02-10 14:42:00amaksetmessages: + msg7657
2013-02-10 14:24:09amaksetnosy: + amak
messages: + msg7656
2012-03-20 17:57:27fwierzbickicreate