diff options
| author | Adam Greenhall <agreenhall@lyft.com> | 2015-09-12 01:30:37 -0700 |
|---|---|---|
| committer | Victor Uriarte <victor.m.uriarte@intel.com> | 2016-06-06 06:31:35 -0700 |
| commit | b15c9c60e2479f6397b7bbcb0787ee66c499e7f8 (patch) | |
| tree | 360dd246aad8ef6c9665be9d93f46da4e76972c2 /tests | |
| parent | 09de892c3b4e14d9b1a765d44e4824ec88e7e0eb (diff) | |
| download | sqlparse-b15c9c60e2479f6397b7bbcb0787ee66c499e7f8.tar.gz | |
Fix/Test Joins
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_format.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/test_format.py b/tests/test_format.py index 9548dc3..dccc3ec 100644 --- a/tests/test_format.py +++ b/tests/test_format.py @@ -139,6 +139,32 @@ class TestFormatReindentAligned(TestCaseBase): ' limit 10', ])) + def test_joins(self): + sql = """ + select * from a + join b on a.one = b.one + left join c on c.two = a.two and c.three = a.three + full outer join d on d.three = a.three + cross join e on e.four = a.four + join f using (one, two, three) + """ + self.ndiffAssertEqual( + self.formatter(sql), + '\n'.join([ + 'select *', + ' from a', + ' join b', + ' on a.one = b.one', + ' left join c', + ' on c.two = a.two', + ' and c.three = a.three', + ' full outer join d', + ' on d.three = a.three', + ' cross join e', + ' on e.four = a.four', + ' join f using (one, two, three)', + ])) + def test_case_statement(self): sql = """ select a, |
