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

Method test_join

tests/test_format.py:454–475  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

452 ' or bzz = 3);'])
453
454 def test_join(self):
455 f = lambda sql: sqlparse.format(sql, reindent=True)
456 s = 'select * from foo join bar on 1 = 2'
457 assert f(s) == '\n'.join([
458 'select *',
459 'from foo',
460 'join bar on 1 = 2'])
461 s = 'select * from foo inner join bar on 1 = 2'
462 assert f(s) == '\n'.join([
463 'select *',
464 'from foo',
465 'inner join bar on 1 = 2'])
466 s = 'select * from foo left outer join bar on 1 = 2'
467 assert f(s) == '\n'.join([
468 'select *',
469 'from foo',
470 'left outer join bar on 1 = 2'])
471 s = 'select * from foo straight_join bar on 1 = 2'
472 assert f(s) == '\n'.join([
473 'select *',
474 'from foo',
475 'straight_join bar on 1 = 2'])
476
477 def test_identifier_list(self):
478 f = lambda sql: sqlparse.format(sql, reindent=True)

Callers

nothing calls this directly

Calls 1

fFunction · 0.85

Tested by

no test coverage detected