(self)
| 354 | mock_update.assert_called() |
| 355 | |
| 356 | def test_font(self): |
| 357 | eq = self.assertEqual |
| 358 | cc = self.cc |
| 359 | |
| 360 | orig_font = cc.text['font'] |
| 361 | test_font = 'TkTextFont' |
| 362 | self.assertNotEqual(orig_font, test_font) |
| 363 | |
| 364 | # Ensure code context is not active. |
| 365 | if cc.context is not None: |
| 366 | cc.toggle_code_context_event() |
| 367 | |
| 368 | self.font_override = test_font |
| 369 | # Nothing breaks or changes with inactive code context. |
| 370 | cc.update_font() |
| 371 | |
| 372 | # Activate code context, previous font change is immediately effective. |
| 373 | cc.toggle_code_context_event() |
| 374 | eq(cc.context['font'], test_font) |
| 375 | |
| 376 | # Call the font update, change is picked up. |
| 377 | self.font_override = orig_font |
| 378 | cc.update_font() |
| 379 | eq(cc.context['font'], orig_font) |
| 380 | |
| 381 | def test_highlight_colors(self): |
| 382 | eq = self.assertEqual |
nothing calls this directly
no test coverage detected