Helper for tests: Create a root Tk object.
(test_instance)
| 18 | |
| 19 | |
| 20 | def get_test_tk_root(test_instance): |
| 21 | """Helper for tests: Create a root Tk object.""" |
| 22 | requires('gui') |
| 23 | root = Tk() |
| 24 | root.withdraw() |
| 25 | |
| 26 | def cleanup_root(): |
| 27 | root.update_idletasks() |
| 28 | root.destroy() |
| 29 | test_instance.addCleanup(cleanup_root) |
| 30 | |
| 31 | return root |
| 32 | |
| 33 | |
| 34 | class CountLinesTest(unittest.TestCase): |
no test coverage detected
searching dependent graphs…