(self)
| 174 | |
| 175 | |
| 176 | def test_resize(self): |
| 177 | x = ttk.LabeledScale(self.root) |
| 178 | x.pack(expand=True, fill='both') |
| 179 | gc_collect() # For PyPy or other GCs. |
| 180 | x.update() |
| 181 | |
| 182 | width, height = x.master.winfo_width(), x.master.winfo_height() |
| 183 | width_new, height_new = width * 2, height * 2 |
| 184 | |
| 185 | x.value = 3 |
| 186 | x.update() |
| 187 | x.master.wm_geometry("%dx%d" % (width_new, height_new)) |
| 188 | self.assertEqual(int(x.label.place_info()['x']), |
| 189 | x.scale.coords()[0]) |
| 190 | |
| 191 | # Reset geometry |
| 192 | x.master.wm_geometry("%dx%d" % (width, height)) |
| 193 | x.destroy() |
| 194 | |
| 195 | |
| 196 | class OptionMenuTest(AbstractTkTest, unittest.TestCase): |
nothing calls this directly
no test coverage detected