diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-07-17 00:01:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-17 00:01:53 (GMT) |
commit | efda9054b9fc91e69ecb34eae84fdd2ca8e6feef (patch) | |
tree | 0273826de9b5809067e8a02b3858a3a2152cafab /Lib | |
parent | a0b1d401db52391d13479c53ee3880e6640df98c (diff) | |
download | cpython-efda9054b9fc91e69ecb34eae84fdd2ca8e6feef.zip cpython-efda9054b9fc91e69ecb34eae84fdd2ca8e6feef.tar.gz cpython-efda9054b9fc91e69ecb34eae84fdd2ca8e6feef.tar.bz2 |
bpo-44655: Include the name of the type in unset __slots__ attribute errors (GH-27199) (GH-27201)
(cherry picked from commit f783428a2313a729ca8b539c5a86ff114b9ff375)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_descr.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 3cb923e..c67911b 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -1303,6 +1303,12 @@ order (MRO) for bases """ with self.assertRaises(AttributeError): del X().a + # Inherit from object on purpose to check some backwards compatibility paths + class X(object): + __slots__ = "a" + with self.assertRaisesRegex(AttributeError, "'X' object has no attribute 'a'"): + X().a + def test_slots_special(self): # Testing __dict__ and __weakref__ in __slots__... class D(object): |