def test_ambiguous3_no_expr(self): src = u'abc:{this is silly} ' parser = Parser(src) self.assertTrue(parser.match(tokens.START)) # should return None as indicator the parse may still be valid, even # though parsing as declaration failed. self.assertEqual(None, parser.declaration())