blob: c197f367c1d643417bd8c215dda78dd65d571f92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# -*- coding: utf-8 -*-
import pytest
from sqlparse import tokens
from sqlparse.keywords import SQL_REGEX
class TestSQLREGEX:
@pytest.mark.parametrize('number', ['1.0', '-1.0',
'1.', '-1.',
'.1', '-.1'])
def test_float_numbers(self, number):
ttype = next(tt for action, tt in SQL_REGEX if action(number))
assert tokens.Number.Float == ttype
|