mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Bug #1486663: don't reject keyword arguments for subclasses of builtin
types. (backport from rev. 53509)
This commit is contained in:
parent
9d8ccf7df2
commit
8e932e7d68
9 changed files with 62 additions and 16 deletions
|
@ -516,6 +516,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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue