diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-12-30 19:47:05 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-12-30 19:47:05 (GMT) |
commit | 533849a27a461a6aee9688bbd18f2205da70a8df (patch) | |
tree | 4c9bc12ec54f0834b8df1ccf2dfeb58e4693749d /Lib/test/test_descr.py | |
parent | 078d2c9c5fc1b2dffe810e5b1b05525ecf5d80d1 (diff) | |
download | cpython-533849a27a461a6aee9688bbd18f2205da70a8df.zip cpython-533849a27a461a6aee9688bbd18f2205da70a8df.tar.gz cpython-533849a27a461a6aee9688bbd18f2205da70a8df.tar.bz2 |
Merged revisions 77161 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r77161 | benjamin.peterson | 2009-12-30 13:44:54 -0600 (Wed, 30 Dec 2009) | 12 lines
Merged revisions 77157 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77157 | benjamin.peterson | 2009-12-30 13:34:10 -0600 (Wed, 30 Dec 2009) | 5 lines
check if the attribute is set before deleting it with T_OBJECT_EX (fixes #7604)
Also, add a note to the docs about the better behavior of T_OBJECT_EX as
compared to T_OBJECT.
........
................
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r-- | Lib/test/test_descr.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 17d96b2..a02fe39 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -1044,6 +1044,11 @@ order (MRO) for bases """ del h self.assertEqual(s.getvalue(), '') + class X(object): + __slots__ = "a" + with self.assertRaises(AttributeError): + del X().a + def test_slots_special(self): # Testing __dict__ and __weakref__ in __slots__... class D(object): |