MCPcopy
hub / github.com/andialbrecht/sqlparse / test_tokenlist_token_matching

Function test_tokenlist_token_matching

tests/test_tokenize.py:110–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

108
109
110def test_tokenlist_token_matching():
111 t1 = sql.Token(T.Keyword, 'foo')
112 t2 = sql.Token(T.Punctuation, ',')
113 x = sql.TokenList([t1, t2])
114 assert x.token_matching([lambda t: t.ttype is T.Keyword], 0) == t1
115 assert x.token_matching([lambda t: t.ttype is T.Punctuation], 0) == t2
116 assert x.token_matching([lambda t: t.ttype is T.Keyword], 1) is None
117
118
119def test_stream_simple():

Callers

nothing calls this directly

Calls 1

token_matchingMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…