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

Method test_configure_data

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

Source from the content-addressed store, hash-verified

247 self.check_create_from_data('png')
248
249 def test_configure_data(self):
250 image = tkinter.PhotoImage('::img::test', master=self.root)
251 self.assertEqual(image['data'], '')
252 with open(self.testfile, 'rb') as f:
253 data = f.read()
254 image.configure(data=data)
255 self.assertEqual(image['data'], data if self.wantobjects
256 else data.decode('latin1'))
257 self.assertEqual(image.width(), 16)
258 self.assertEqual(image.height(), 16)
259
260 def test_configure_format(self):
261 image = tkinter.PhotoImage('::img::test', master=self.root)

Callers

nothing calls this directly

Calls 7

heightMethod · 0.80
openFunction · 0.50
assertEqualMethod · 0.45
readMethod · 0.45
configureMethod · 0.45
decodeMethod · 0.45
widthMethod · 0.45

Tested by

no test coverage detected