(self)
| 110 | self.assertNotIn('::img::test', self.root.image_names()) |
| 111 | |
| 112 | def test_create_from_data(self): |
| 113 | with open(self.testfile, 'rb') as f: |
| 114 | data = f.read() |
| 115 | image = tkinter.BitmapImage('::img::test', master=self.root, |
| 116 | foreground='yellow', background='blue', |
| 117 | data=data) |
| 118 | self.assertEqual(str(image), '::img::test') |
| 119 | self.assertEqual(image.type(), 'bitmap') |
| 120 | self.assertEqual(image.width(), 16) |
| 121 | self.assertEqual(image.height(), 16) |
| 122 | self.assertIn('::img::test', self.root.image_names()) |
| 123 | del image |
| 124 | support.gc_collect() # For PyPy or other GCs. |
| 125 | self.assertNotIn('::img::test', self.root.image_names()) |
| 126 | |
| 127 | def assertEqualStrList(self, actual, expected): |
| 128 | self.assertIsInstance(actual, str) |
nothing calls this directly
no test coverage detected