(self)
| 169 | self.assertIn(d.font_name.get(), up_font.lower()) |
| 170 | |
| 171 | def test_fontlist_mouse(self): |
| 172 | # Click on item should select that item. |
| 173 | d = self.page |
| 174 | if d.fontlist.size() < 2: |
| 175 | self.skipTest('need at least 2 fonts') |
| 176 | fontlist = d.fontlist |
| 177 | fontlist.activate(0) |
| 178 | |
| 179 | # Select next item in listbox |
| 180 | fontlist.focus_force() |
| 181 | fontlist.see(1) |
| 182 | fontlist.update() |
| 183 | x, y, dx, dy = fontlist.bbox(1) |
| 184 | x += dx // 2 |
| 185 | y += dy // 2 |
| 186 | fontlist.event_generate('<Button-1>', x=x, y=y) |
| 187 | fontlist.event_generate('<ButtonRelease-1>', x=x, y=y) |
| 188 | |
| 189 | font1 = fontlist.get(1) |
| 190 | select_font = fontlist.get('anchor') |
| 191 | self.assertEqual(select_font, font1) |
| 192 | self.assertIn(d.font_name.get(), font1.lower()) |
| 193 | |
| 194 | def test_sizelist(self): |
| 195 | # Click on number should select that number |
nothing calls this directly
no test coverage detected