(self)
| 128 | self._assert_cycle({1: {2}, 2: {3}, 3: {2, 4}, 4: {5}}, [3, 2]) |
| 129 | |
| 130 | def test_calls_before_prepare(self): |
| 131 | ts = graphlib.TopologicalSorter() |
| 132 | |
| 133 | with self.assertRaisesRegex(ValueError, r"prepare\(\) must be called first"): |
| 134 | ts.get_ready() |
| 135 | with self.assertRaisesRegex(ValueError, r"prepare\(\) must be called first"): |
| 136 | ts.done(3) |
| 137 | with self.assertRaisesRegex(ValueError, r"prepare\(\) must be called first"): |
| 138 | ts.is_active() |
| 139 | |
| 140 | def test_prepare_multiple_times(self): |
| 141 | ts = graphlib.TopologicalSorter() |
nothing calls this directly
no test coverage detected