Bug #1486663: don't reject keyword arguments for subclasses of builtin
types.
diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py
index ddbcc2f..77bccf6 100644
--- a/Lib/test/test_random.py
+++ b/Lib/test/test_random.py
@@ -515,6 +515,14 @@
# 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,