(self)
| 3455 | self.assertListEqual(self._trace(f, "spam"), [1, 2, 4, 6, 7]) |
| 3456 | |
| 3457 | def test_no_default(self): |
| 3458 | def f(command): # 0 |
| 3459 | match command.split(): # 1 |
| 3460 | case ["go", direction] if direction in "nesw": # 2 |
| 3461 | return f"go {direction}" # 3 |
| 3462 | case ["go", _]: # 4 |
| 3463 | return "no go" # 5 |
| 3464 | |
| 3465 | self.assertListEqual(self._trace(f, "go n"), [1, 2, 3]) |
| 3466 | self.assertListEqual(self._trace(f, "go x"), [1, 2, 4, 5]) |
| 3467 | self.assertListEqual(self._trace(f, "spam"), [1, 2, 4]) |
| 3468 | |
| 3469 | def test_only_default_wildcard(self): |
| 3470 | def f(command): # 0 |
nothing calls this directly
no test coverage detected