diff options
| author | Benjamin Peterson <benjamin@python.org> | 2011-10-15 17:43:21 (GMT) |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2011-10-15 17:43:21 (GMT) |
| commit | a7b0976c3e183397a648598d96a7e1fa965cbd90 (patch) | |
| tree | 893cfaada76ad21f2d3f9798cf98c60e5df32e84 /Lib/test/test_class.py | |
| parent | 5baef6d23b766121d92e8f562557ff9c3f3ef2db (diff) | |
| download | cpython-a7b0976c3e183397a648598d96a7e1fa965cbd90.zip cpython-a7b0976c3e183397a648598d96a7e1fa965cbd90.tar.gz cpython-a7b0976c3e183397a648598d96a7e1fa965cbd90.tar.bz2 | |
PyEval_CallObject requires a tuple of args (closes #13186)
Diffstat (limited to 'Lib/test/test_class.py')
| -rw-r--r-- | Lib/test/test_class.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py index 0f25101..db75b93 100644 --- a/Lib/test/test_class.py +++ b/Lib/test/test_class.py @@ -350,6 +350,19 @@ class ClassTests(unittest.TestCase): AllTests.__delslice__ = delslice + @test_support.cpython_only + def testDelItem(self): + class A: + ok = False + def __delitem__(self, key): + self.ok = True + a = A() + # Subtle: we need to call PySequence_SetItem, not PyMapping_SetItem. + from _testcapi import sequence_delitem + sequence_delitem(a, 2) + self.assertTrue(a.ok) + + def testUnaryOps(self): testme = AllTests() |
