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

Method test_no_default

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

Source from the content-addressed store, hash-verified

3465
3466 @unittest.expectedFailure # TODO: RUSTPYTHON
3467 def test_no_default(self):
3468 def f(command): # 0
3469 match command.split(): # 1
3470 case ["go", direction] if direction in "nesw": # 2
3471 return f"go {direction}" # 3
3472 case ["go", _]: # 4
3473 return "no go" # 5
3474
3475 self.assertListEqual(self._trace(f, "go n"), [1, 2, 3])
3476 self.assertListEqual(self._trace(f, "go x"), [1, 2, 4, 5])
3477 self.assertListEqual(self._trace(f, "spam"), [1, 2, 4])
3478
3479 @unittest.expectedFailure # TODO: RUSTPYTHON
3480 def test_only_default_wildcard(self):

Callers

nothing calls this directly

Calls 2

_traceMethod · 0.95
assertListEqualMethod · 0.80

Tested by

no test coverage detected