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

Method test_iterable_protocol

Lib/test/test_tkinter/test_images.py:79–88  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

77 image.configure(spam=print)
78
79 def test_iterable_protocol(self):
80 image = self.create()
81 self.assertNotIsSubclass(self.image_class, collections.abc.Iterable)
82 self.assertNotIsSubclass(self.image_class, collections.abc.Container)
83 self.assertNotIsInstance(image, collections.abc.Iterable)
84 self.assertNotIsInstance(image, collections.abc.Container)
85 with self.assertRaisesRegex(TypeError, 'is not iterable'):
86 iter(image)
87 with self.assertRaisesRegex(TypeError, 'is not a container or iterable'):
88 image in image
89
90
91class BitmapImageTest(BaseImageTest, AbstractTkTest, unittest.TestCase):

Callers

nothing calls this directly

Calls 4

createMethod · 0.95
assertNotIsSubclassMethod · 0.80
assertNotIsInstanceMethod · 0.80
assertRaisesRegexMethod · 0.80

Tested by

no test coverage detected