(self)
| 799 | |
| 800 | class TestTreeTui: |
| 801 | def test_no_allocations(self): |
| 802 | # GIVEN |
| 803 | peak_allocations = [] |
| 804 | |
| 805 | reporter = TreeReporter.from_snapshot( |
| 806 | peak_allocations, native_traces=False, biggest_allocs=3 |
| 807 | ) |
| 808 | app = reporter.get_app() |
| 809 | |
| 810 | # WHEN |
| 811 | async def run_test(): |
| 812 | async with app.run_test() as pilot: |
| 813 | await pilot.pause() |
| 814 | return app.screen.query_one(Tree).root |
| 815 | |
| 816 | root = async_run(run_test()) |
| 817 | |
| 818 | # THEN |
| 819 | assert tree_to_dict(root) == TreeElement( |
| 820 | label="<No allocations>", children=[], is_expanded=True, allow_expand=True |
| 821 | ) |
| 822 | |
| 823 | def test_single_chain_is_expanded(self): |
| 824 | # GIVEN |
nothing calls this directly
no test coverage detected