(self)
| 3441 | self.assertListEqual(self._trace(f, "spam"), [1, 2, 4, 6, 7]) |
| 3442 | |
| 3443 | def test_default_capture(self): |
| 3444 | def f(command): # 0 |
| 3445 | match command.split(): # 1 |
| 3446 | case ["go", direction] if direction in "nesw": # 2 |
| 3447 | return f"go {direction}" # 3 |
| 3448 | case ["go", _]: # 4 |
| 3449 | return "no go" # 5 |
| 3450 | case x: # 6 |
| 3451 | return x # 7 |
| 3452 | |
| 3453 | self.assertListEqual(self._trace(f, "go n"), [1, 2, 3]) |
| 3454 | self.assertListEqual(self._trace(f, "go x"), [1, 2, 4, 5]) |
| 3455 | self.assertListEqual(self._trace(f, "spam"), [1, 2, 4, 6, 7]) |
| 3456 | |
| 3457 | def test_no_default(self): |
| 3458 | def f(command): # 0 |
nothing calls this directly
no test coverage detected