diff options
author | Raymond Hettinger <python@rcn.com> | 2007-01-11 18:22:55 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2007-01-11 18:22:55 (GMT) |
commit | 9fdfadb06ee3c6d182af084afaa97bc6bf4652bc (patch) | |
tree | 98dbbae4cf1e3e87bd32c96c7914af1983912f06 /Lib/test/test_set.py | |
parent | a398e2d0592464b6594bac0e4ee3ef091cce5159 (diff) | |
download | cpython-9fdfadb06ee3c6d182af084afaa97bc6bf4652bc.zip cpython-9fdfadb06ee3c6d182af084afaa97bc6bf4652bc.tar.gz cpython-9fdfadb06ee3c6d182af084afaa97bc6bf4652bc.tar.bz2 |
SF #1486663 -- Allow keyword args in subclasses of set() and frozenset().
Diffstat (limited to 'Lib/test/test_set.py')
-rw-r--r-- | Lib/test/test_set.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py index dedd1fb..49bdec3 100644 --- a/Lib/test/test_set.py +++ b/Lib/test/test_set.py @@ -468,6 +468,16 @@ class SetSubclass(set): class TestSetSubclass(TestSet): thetype = SetSubclass +class SetSubclassWithKeywordArgs(set): + def __init__(self, iterable=[], newarg=None): + set.__init__(self, iterable) + +class TestSetSubclassWithKeywordArgs(TestSet): + + def test_keywords_in_subclass(self): + 'SF bug #1486663 -- this used to erroneously raise a TypeError' + SetSubclassWithKeywordArgs(newarg=1) + class TestFrozenSet(TestJointOps): thetype = frozenset @@ -1450,6 +1460,7 @@ def test_main(verbose=None): test_classes = ( TestSet, TestSetSubclass, + TestSetSubclassWithKeywordArgs, TestFrozenSet, TestFrozenSetSubclass, TestSetOfSets, |