MCPcopy Create free account
hub / github.com/andialbrecht/sqlparse / test_strip_ws

Method test_strip_ws

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

Source from the content-addressed store, hash-verified

139 assert res == sql
140
141 def test_strip_ws(self):
142 f = lambda sql: sqlparse.format(sql, strip_whitespace=True)
143 s = 'select\n* from foo\n\twhere ( 1 = 2 )\n'
144 assert f(s) == 'select * from foo where (1 = 2)'
145 s = 'select -- foo\nfrom bar\n'
146 assert f(s) == 'select -- foo\nfrom bar'
147
148 def test_strip_ws_invalid_option(self):
149 s = 'select -- foo\nfrom bar\n'

Callers

nothing calls this directly

Calls 1

fFunction · 0.85

Tested by

no test coverage detected