Create a mock EditorWindow instance.
(self, with_text_widget=False)
| 81 | class SqueezerTest(unittest.TestCase): |
| 82 | """Tests for the Squeezer class.""" |
| 83 | def make_mock_editor_window(self, with_text_widget=False): |
| 84 | """Create a mock EditorWindow instance.""" |
| 85 | editwin = NonCallableMagicMock() |
| 86 | editwin.width = 80 |
| 87 | |
| 88 | if with_text_widget: |
| 89 | editwin.root = get_test_tk_root(self) |
| 90 | text_widget = self.make_text_widget(root=editwin.root) |
| 91 | editwin.text = editwin.per.bottom = text_widget |
| 92 | |
| 93 | return editwin |
| 94 | |
| 95 | def make_squeezer_instance(self, editor_window=None): |
| 96 | """Create an actual Squeezer instance with a mock EditorWindow.""" |
no test coverage detected