MCPcopy Index your code
hub / github.com/python/cpython / test_iter_items

Method test_iter_items

Lib/test/test_descr.py:5443–5452  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5441 @unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
5442 'trace function introduces __local__')
5443 def test_iter_items(self):
5444 # Testing dict-proxy iteritems...
5445 it = self.C.__dict__.items()
5446 self.assertNotIsInstance(it, list)
5447 keys = [item[0] for item in it]
5448 keys.sort()
5449 self.assertEqual(keys, ['__dict__', '__doc__', '__firstlineno__',
5450 '__module__',
5451 '__static_attributes__', '__weakref__',
5452 'meth'])
5453
5454 def test_dict_type_with_metaclass(self):
5455 # Testing type of __dict__ when metaclass set...

Callers

nothing calls this directly

Calls 4

assertNotIsInstanceMethod · 0.80
itemsMethod · 0.45
sortMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected