Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5e8dada

Browse files
committed
oops, wrong class
1 parent 1c02a44 commit 5e8dada

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Lib/test/test_descr.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4224,6 +4224,13 @@ def __getattribute__(self, name):
42244224

42254225
self.assertRaises(AttributeError, getattr, EvilGetattribute(), "attr")
42264226

4227+
def test_type_has_no_abstractmethods(self):
4228+
# type pretends not to have __abstractmethods__.
4229+
self.assertRaises(AttributeError, getattr, type, "__abstractmethods__")
4230+
class meta(type):
4231+
pass
4232+
self.assertRaises(AttributeError, getattr, meta, "__abstractmethods__")
4233+
42274234

42284235
class DictProxyTests(unittest.TestCase):
42294236
def setUp(self):
@@ -4273,13 +4280,6 @@ def test_repr(self):
42734280
dict_ = {k: v for k, v in self.C.__dict__.items()}
42744281
self.assertEqual(repr(self.C.__dict__), 'dict_proxy({!r})'.format(dict_))
42754282

4276-
def test_type_has_no_abstractmethods(self):
4277-
# type pretends not to have __abstractmethods__.
4278-
self.assertRaises(AttributeError, getattr, type, "__abstractmethods__")
4279-
class meta(type):
4280-
pass
4281-
self.assertRaises(AttributeError, getattr, meta, "__abstractmethods__")
4282-
42834283

42844284
class PTypesLongInitTest(unittest.TestCase):
42854285
# This is in its own TestCase so that it can be run before any other tests.

0 commit comments

Comments
 (0)