diff options
| author | Victor Uriarte <victor.m.uriarte@intel.com> | 2016-06-10 20:48:07 -0700 |
|---|---|---|
| committer | Victor Uriarte <victor.m.uriarte@intel.com> | 2016-06-11 04:35:13 -0700 |
| commit | b99b6f214eab7fe8f08a7a7d2a1f57e0826ae83a (patch) | |
| tree | b31dd3795afababecece832a3afbc481abc54f51 /tests/test_format.py | |
| parent | 2679ae8a7f39a84f54d546cb9d0388abf5acb156 (diff) | |
| download | sqlparse-b99b6f214eab7fe8f08a7a7d2a1f57e0826ae83a.tar.gz | |
Add right marging and options tests
Make pytest alert of any passing tests marked to fail
Idea is to include tests for un-fixed bugs. If they are passing
we want to know
Diffstat (limited to 'tests/test_format.py')
| -rw-r--r-- | tests/test_format.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_format.py b/tests/test_format.py index 7b5af06..8ca19d9 100644 --- a/tests/test_format.py +++ b/tests/test_format.py @@ -587,3 +587,17 @@ def test_having_produces_newline(): 'having sum(bar.value) > 100' ] assert formatted == '\n'.join(expected) + + +def test_format_right_margin_invalid_input(): + with pytest.raises(SQLParseError): + sqlparse.format('foo', right_margin=2) + + with pytest.raises(SQLParseError): + sqlparse.format('foo', right_margin="two") + + +@pytest.mark.xfail(reason="Needs fixing") +def test_format_right_margin(): + # TODO: Needs better test, only raises exception right now + sqlparse.format('foo', right_margin="79") |
