[Jython-checkins] jython: #1859: Re-arranging unit tests to separate out tests that cannot pass with the
alan.kennedy
jython-checkins at python.org
Sun Feb 10 15:18:51 CET 2013
http://hg.python.org/jython/rev/50966417912b
changeset: 7032:50966417912b
user: Alan Kennedy <alan at xhaus.com>
date: Sun Feb 10 14:17:24 2013 +0000
summary:
#1859: Re-arranging unit tests to separate out tests that cannot pass with the current implementation
files:
Lib/test/test_zlib.py | 21 +++++++++++++++------
NEWS | 4 ++++
2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py
--- a/Lib/test/test_zlib.py
+++ b/Lib/test/test_zlib.py
@@ -24,15 +24,21 @@
self.assertEqual(zlib.crc32("", 1), 1)
self.assertEqual(zlib.crc32("", 432), 432)
- @unittest.skipIf(is_jython, "FIXME #1859: not working on Jython")
+ def test_adler32(self):
+ self.assertEqual(zlib.adler32(""), zlib.adler32("", 1))
+
+ @unittest.skipIf(is_jython, "jython uses java.util.zip.Adler32, \
+ which does not support a start value")
def test_adler32start(self):
- self.assertEqual(zlib.adler32(""), zlib.adler32("", 1))
self.assertTrue(zlib.adler32("abc", 0xffffffff))
- @unittest.skipIf(is_jython, "FIXME #1859: not working on Jython")
def test_adler32empty(self):
+ self.assertEqual(zlib.adler32("", 1), 1)
+
+ @unittest.skipIf(is_jython, "jython uses java.util.zip.Adler32, \
+ which does not support a start value")
+ def test_adler32empty_start(self):
self.assertEqual(zlib.adler32("", 0), 0)
- self.assertEqual(zlib.adler32("", 1), 1)
self.assertEqual(zlib.adler32("", 432), 432)
def assertEqual32(self, seen, expected):
@@ -40,16 +46,19 @@
# This is important if bit 31 (0x08000000L) is set.
self.assertEqual(seen & 0x0FFFFFFFFL, expected & 0x0FFFFFFFFL)
- @unittest.skipIf(is_jython, "FIXME #1859: not working on Jython")
def test_penguins(self):
self.assertEqual32(zlib.crc32("penguin", 0), 0x0e5c1a120L)
self.assertEqual32(zlib.crc32("penguin", 1), 0x43b6aa94)
- self.assertEqual32(zlib.adler32("penguin", 0), 0x0bcf02f6)
self.assertEqual32(zlib.adler32("penguin", 1), 0x0bd602f7)
self.assertEqual(zlib.crc32("penguin"), zlib.crc32("penguin", 0))
self.assertEqual(zlib.adler32("penguin"),zlib.adler32("penguin",1))
+ @unittest.skipIf(is_jython, "jython uses java.util.zip.Adler32, \
+ which does not support a start value")
+ def test_penguins_start(self):
+ self.assertEqual32(zlib.adler32("penguin", 0), 0x0bcf02f6)
+
def test_abcdefghijklmnop(self):
"""test issue1202 compliance: signed crc32, adler32 in 2.x"""
foo = 'abcdefghijklmnop'
diff --git a/NEWS b/NEWS
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,9 @@
Jython NEWS
+Jython 2.7b2
+ Bugs Fixed
+ - [ 1753 ] zlib doesn't call end() on compress and decompress
+
Jython 2.7b1
Bugs Fixed
- [ 1716 ] xrange slicing raises NPE.
--
Repository URL: http://hg.python.org/jython
More information about the Jython-checkins
mailing list