summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_array.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_array.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_array.py')
-rwxr-xr-xLib/test/test_array.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py
index 06f13cd..63e7f4e 100755
--- a/Lib/test/test_array.py
+++ b/Lib/test/test_array.py
@@ -12,6 +12,10 @@ from cPickle import loads, dumps
class ArraySubclass(array.array):
pass
+class ArraySubclassWithKwargs(array.array):
+ def __init__(self, typecode, newarg=None):
+ array.array.__init__(typecode)
+
tests = [] # list to accumulate all tests
typecodes = "cubBhHiIlLfd"
@@ -683,6 +687,9 @@ class BaseTest(unittest.TestCase):
b = array.array('B', range(64))
self.assertEqual(rc, sys.getrefcount(10))
+ def test_subclass_with_kwargs(self):
+ # SF bug #1486663 -- this used to erroneously raise a TypeError
+ ArraySubclassWithKwargs('b', newarg=1)
class StringTest(BaseTest):