summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zlib.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-06-25 19:43:05 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-06-25 19:43:05 (GMT)
commit95657cdd40dace0a8f62c50b3f0991b4ec9972fd (patch)
treebf466a0cc516e0292442c5db35c8e6c9fc92790a /Lib/test/test_zlib.py
parent696c35e86bffea1f2bc6179a29e46416899e3de6 (diff)
downloadcpython-95657cdd40dace0a8f62c50b3f0991b4ec9972fd.zip
cpython-95657cdd40dace0a8f62c50b3f0991b4ec9972fd.tar.gz
cpython-95657cdd40dace0a8f62c50b3f0991b4ec9972fd.tar.bz2
Issue #26243: Only the level argument to zlib.compress() is keyword argument
now. The first argument is positional-only.
Diffstat (limited to 'Lib/test/test_zlib.py')
-rw-r--r--Lib/test/test_zlib.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py
index 4d3611c..bb9292b 100644
--- a/Lib/test/test_zlib.py
+++ b/Lib/test/test_zlib.py
@@ -163,8 +163,10 @@ class CompressTestCase(BaseCompressTestCase, unittest.TestCase):
self.assertEqual(zlib.decompress(x), HAMLET_SCENE)
def test_keywords(self):
- x = zlib.compress(data=HAMLET_SCENE, level=3)
+ x = zlib.compress(HAMLET_SCENE, level=3)
self.assertEqual(zlib.decompress(x), HAMLET_SCENE)
+ with self.assertRaises(TypeError):
+ zlib.compress(data=HAMLET_SCENE, level=3)
def test_speech128(self):
# compress more data