summaryrefslogtreecommitdiff
path: root/Lib/test/test_random.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-01-21 10:28:43 +0000
committerGeorg Brandl <georg@python.org>2007-01-21 10:28:43 +0000
commitb84c13792db49abdfac97663badfeda0bba11279 (patch)
tree9a6099e4f7800a7a2cbaf4218c3039939263bf40 /Lib/test/test_random.py
parentaef4c6bc00f1b49b4a92b362ef1b60e7c5af5e86 (diff)
downloadcpython-git-b84c13792db49abdfac97663badfeda0bba11279.tar.gz
Bug #1486663: don't reject keyword arguments for subclasses of builtin
types.
Diffstat (limited to 'Lib/test/test_random.py')
-rw-r--r--Lib/test/test_random.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py
index ddbcc2fd32..77bccf6793 100644
--- a/Lib/test/test_random.py
+++ b/Lib/test/test_random.py
@@ -515,6 +515,14 @@ class TestModule(unittest.TestCase):
# tests validity but not completeness of the __all__ list
self.failUnless(set(random.__all__) <= set(dir(random)))
+ def test_random_subclass_with_kwargs(self):
+ # SF bug #1486663 -- this used to erroneously raise a TypeError
+ class Subclass(random.Random):
+ def __init__(self, newarg=None):
+ random.Random.__init__(self)
+ Subclass(newarg=1)
+
+
def test_main(verbose=None):
testclasses = [WichmannHill_TestBasicOps,
MersenneTwister_TestBasicOps,