summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDarik Gamble <darik.gamble@gmail.com>2015-02-06 14:55:55 -0500
committerDarik Gamble <darik.gamble@gmail.com>2015-02-06 14:55:55 -0500
commit313f0f31e2e67229da32393767d4cf500518815a (patch)
treef04e81884c460a7e1ad8c4e32fe0b6b3a6d95ee6 /tests
parent161d0aea74787b32ea4c683700365f155551d094 (diff)
downloadsqlparse-313f0f31e2e67229da32393767d4cf500518815a.tar.gz
Add double precision as a built-in datatype
Diffstat (limited to 'tests')
-rw-r--r--tests/test_parse.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_parse.py b/tests/test_parse.py
index fd48127..2650d7f 100644
--- a/tests/test_parse.py
+++ b/tests/test_parse.py
@@ -166,6 +166,14 @@ def test_psql_quotation_marks(): # issue83
assert len(t) == 2
+def test_double_precision_is_builtin():
+ sql = 'DOUBLE PRECISION'
+ t = sqlparse.parse(sql)[0].tokens
+ assert (len(t) == 1
+ and t[0].ttype == sqlparse.tokens.Name.Builtin
+ and t[0].value == 'DOUBLE PRECISION')
+
+
@pytest.mark.parametrize('ph', ['?', ':1', ':foo', '%s', '%(foo)s'])
def test_placeholder(ph):
p = sqlparse.parse(ph)[0].tokens
@@ -196,3 +204,4 @@ def test_single_quotes_with_linebreaks(): # issue118
p = sqlparse.parse("'f\nf'")[0].tokens
assert len(p) == 1
assert p[0].ttype is T.String.Single
+