diff options
Diffstat (limited to 'Lib/test/test_class.py')
-rw-r--r-- | Lib/test/test_class.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py index db75b93479..e5cdf088f4 100644 --- a/Lib/test/test_class.py +++ b/Lib/test/test_class.py @@ -628,6 +628,13 @@ class ClassTests(unittest.TestCase): a = A(hash(A.f.im_func)^(-1)) hash(a.f) + def testAttrSlots(self): + class C: + pass + for c in C, C(): + self.assertRaises(TypeError, type(c).__getattribute__, c, []) + self.assertRaises(TypeError, type(c).__setattr__, c, [], []) + def test_main(): with test_support.check_py3k_warnings( (".+__(get|set|del)slice__ has been removed", DeprecationWarning), |