diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2011-06-10 22:08:10 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2011-06-10 22:08:10 +0200 |
| commit | f6f2e20e4c61d50fbd5cbf0e685b03d8c5927a3a (patch) | |
| tree | a7ab16a37315dbace58d6a87e9d4574eb5b382b2 /tests | |
| parent | 47e7f56a52870bdb278225fc05866efcb5e65a1d (diff) | |
| download | sqlparse-f6f2e20e4c61d50fbd5cbf0e685b03d8c5927a3a.tar.gz | |
Fix removal of comments when strip_comments is True (fixes issue38).
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_regressions.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_regressions.py b/tests/test_regressions.py index cbe1234..6624d33 100644 --- a/tests/test_regressions.py +++ b/tests/test_regressions.py @@ -39,3 +39,10 @@ class RegressionTests(TestCaseBase): self.ndiffAssertEqual(sql, "\n".join(["select *", "from foo", "where bar = 1 limit 1"])) + + def test_issue38(self): + sql = sqlparse.format("SELECT foo; -- comment", + strip_comments=True) + self.ndiffAssertEqual(sql, "SELECT foo;") + sql = sqlparse.format("/* foo */", strip_comments=True) + self.ndiffAssertEqual(sql, "") |
