MCPcopy Index your code
hub / github.com/andialbrecht/sqlparse / test_get_token_at_offset

Function test_get_token_at_offset

tests/test_parse.py:327–336  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

325
326
327def test_get_token_at_offset():
328 p = sqlparse.parse('select * from dual')[0]
329 # 0123456789
330 assert p.get_token_at_offset(0) == p.tokens[0]
331 assert p.get_token_at_offset(1) == p.tokens[0]
332 assert p.get_token_at_offset(6) == p.tokens[1]
333 assert p.get_token_at_offset(7) == p.tokens[2]
334 assert p.get_token_at_offset(8) == p.tokens[3]
335 assert p.get_token_at_offset(9) == p.tokens[4]
336 assert p.get_token_at_offset(10) == p.tokens[4]
337
338
339def test_pprint():

Callers

nothing calls this directly

Calls 1

get_token_at_offsetMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…