summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_deque.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-01-21 10:28:43 (GMT)
committerGeorg Brandl <georg@python.org>2007-01-21 10:28:43 (GMT)
commitb84c13792db49abdfac97663badfeda0bba11279 (patch)
tree9a6099e4f7800a7a2cbaf4218c3039939263bf40 /Lib/test/test_deque.py
parentaef4c6bc00f1b49b4a92b362ef1b60e7c5af5e86 (diff)
downloadcpython-b84c13792db49abdfac97663badfeda0bba11279.zip
cpython-b84c13792db49abdfac97663badfeda0bba11279.tar.gz
cpython-b84c13792db49abdfac97663badfeda0bba11279.tar.bz2
Bug #1486663: don't reject keyword arguments for subclasses of builtin
types.
Diffstat (limited to 'Lib/test/test_deque.py')
-rw-r--r--Lib/test/test_deque.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_deque.py b/Lib/test/test_deque.py
index 35e1536..1d996ee 100644
--- a/Lib/test/test_deque.py
+++ b/Lib/test/test_deque.py
@@ -486,6 +486,16 @@ class TestSubclass(unittest.TestCase):
d1 == d2 # not clear if this is supposed to be True or False,
# but it used to give a SystemError
+
+class SubclassWithKwargs(deque):
+ def __init__(self, newarg=1):
+ deque.__init__(self)
+
+class TestSubclassWithKwargs(unittest.TestCase):
+ def test_subclass_with_kwargs(self):
+ # SF bug #1486663 -- this used to erroneously raise a TypeError
+ SubclassWithKwargs(newarg=1)
+
#==============================================================================
libreftest = """
@@ -599,6 +609,7 @@ def test_main(verbose=None):
TestBasic,
TestVariousIteratorArgs,
TestSubclass,
+ TestSubclassWithKwargs,
)
test_support.run_unittest(*test_classes)