diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2014-11-30 06:48:25 +0100 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2014-11-30 06:48:25 +0100 |
| commit | dcd67a6e21c2fb523caa5dc9c41e62fcd4e45319 (patch) | |
| tree | 1d3ad63f7c405a0bf1fbe26128857693afeae528 /tests | |
| parent | 0619bb662fb102eabb78f7059270d5766812c1e1 (diff) | |
| download | sqlparse-dcd67a6e21c2fb523caa5dc9c41e62fcd4e45319.tar.gz | |
Better handling of floats in UPDATE statements (issue145).
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_grouping.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_grouping.py b/tests/test_grouping.py index 93f1b0e..86d4c7a 100644 --- a/tests/test_grouping.py +++ b/tests/test_grouping.py @@ -278,6 +278,15 @@ def test_comparison_with_keywords(): # issue90 assert isinstance(p.tokens[0], sql.Comparison) +def test_comparison_with_floats(): # issue145 + p = sqlparse.parse('foo = 25.5')[0] + assert len(p.tokens) == 1 + assert isinstance(p.tokens[0], sql.Comparison) + assert len(p.tokens[0].tokens) == 5 + assert p.tokens[0].left.value == 'foo' + assert p.tokens[0].right.value == '25.5' + + def test_comparison_with_parenthesis(): # issue23 p = sqlparse.parse('(3 + 4) = 7')[0] assert len(p.tokens) == 1 |
