MCPcopy Index your code
hub / github.com/webpy/webpy / f

Function f

web/db.py:1705–1709  ·  view source on GitHub ↗
(text, expected)

Source from the content-addressed store, hash-verified

1703
1704def test_parser():
1705 def f(text, expected):
1706 p = Parser()
1707 nodes = list(p.parse(text))
1708 print(repr(text), nodes)
1709 assert nodes == expected, "Expected %r" % expected
1710
1711 f("Hello", [_Node("text", "Hello")])
1712 f("Hello $name", [_Node("text", "Hello "), _Node("param", "name")])

Callers 11

testUnicodeInputMethod · 0.85
test_changequeryMethod · 0.85
test_setcookieMethod · 0.85
test_overriddenMethod · 0.85
test_quotesMethod · 0.85
test_accessorMethod · 0.85
test_hrefMethod · 0.85
test_parserFunction · 0.85
test_safeevalFunction · 0.85
_delegateMethod · 0.85
_filter_linksMethod · 0.85

Calls 4

parseMethod · 0.95
SafeEvalClass · 0.85
safeevalMethod · 0.80
ParserClass · 0.70

Tested by 9

testUnicodeInputMethod · 0.68
test_changequeryMethod · 0.68
test_setcookieMethod · 0.68
test_overriddenMethod · 0.68
test_quotesMethod · 0.68
test_accessorMethod · 0.68
test_hrefMethod · 0.68
test_parserFunction · 0.68
test_safeevalFunction · 0.68