MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_default_capture

Method test_default_capture

Lib/test/test_patma.py:3452–3464  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3450
3451 @unittest.expectedFailure # TODO: RUSTPYTHON
3452 def test_default_capture(self):
3453 def f(command): # 0
3454 match command.split(): # 1
3455 case ["go", direction] if direction in "nesw": # 2
3456 return f"go {direction}" # 3
3457 case ["go", _]: # 4
3458 return "no go" # 5
3459 case x: # 6
3460 return x # 7
3461
3462 self.assertListEqual(self._trace(f, "go n"), [1, 2, 3])
3463 self.assertListEqual(self._trace(f, "go x"), [1, 2, 4, 5])
3464 self.assertListEqual(self._trace(f, "spam"), [1, 2, 4, 6, 7])
3465
3466 @unittest.expectedFailure # TODO: RUSTPYTHON
3467 def test_no_default(self):

Callers

nothing calls this directly

Calls 2

_traceMethod · 0.95
assertListEqualMethod · 0.80

Tested by

no test coverage detected