(self)
| 634 | |
| 635 | class TestVizMemoryLayout(unittest.TestCase): |
| 636 | def test_double_alloc(self): |
| 637 | with save_viz(): |
| 638 | a = _alloc(1) |
| 639 | _b = _alloc(1) |
| 640 | profile_ret = load_profile(Buffer.profile_events) |
| 641 | ret = profile_ret["layout"][f"{a.device} Memory"] |
| 642 | self.assertEqual(ret["peak"], 2) |
| 643 | self.assertEqual(len(ret["events"]), 4) |
| 644 | |
| 645 | def test_del_once(self): |
| 646 | with save_viz(): |
nothing calls this directly
no test coverage detected