def test_placeholder_with_methodcalling(self): match = Match("python") @match.when(_.startwith("aa"), let_="moo") def case1(moo): return moo @match.when(_.startswith("pyt"), let_=("a")) def case2(a): return a self.assertEqual(match.end, "python")