(self)
| 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' |