(self)
| 156 | ts.prepare() |
| 157 | |
| 158 | def test_invalid_nodes_in_done(self): |
| 159 | ts = graphlib.TopologicalSorter() |
| 160 | ts.add(1, 2, 3, 4) |
| 161 | ts.add(2, 3, 4) |
| 162 | ts.prepare() |
| 163 | ts.get_ready() |
| 164 | |
| 165 | with self.assertRaisesRegex(ValueError, "node 2 was not passed out"): |
| 166 | ts.done(2) |
| 167 | with self.assertRaisesRegex(ValueError, r"node 24 was not added using add\(\)"): |
| 168 | ts.done(24) |
| 169 | |
| 170 | def test_done(self): |
| 171 | ts = graphlib.TopologicalSorter() |
nothing calls this directly
no test coverage detected