added tests for big int vs integer check
This commit is contained in:
parent
7753d0610a
commit
96f57f161a
@ -6,7 +6,7 @@ import os
|
|||||||
import unittest
|
import unittest
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from sqlalchemy import FLOAT, INTEGER, TEXT
|
from sqlalchemy import FLOAT, INTEGER, TEXT, BIGINT
|
||||||
from sqlalchemy.exc import IntegrityError, SQLAlchemyError, ArgumentError
|
from sqlalchemy.exc import IntegrityError, SQLAlchemyError, ArgumentError
|
||||||
|
|
||||||
from dataset import connect
|
from dataset import connect
|
||||||
@ -441,6 +441,14 @@ class TableTestCase(unittest.TestCase):
|
|||||||
assert 'pippo' in tbl.table.c, tbl.table.c
|
assert 'pippo' in tbl.table.c, tbl.table.c
|
||||||
assert isinstance(tbl.table.c['pippo'].type, TEXT), \
|
assert isinstance(tbl.table.c['pippo'].type, TEXT), \
|
||||||
tbl.table.c['pippo'].type
|
tbl.table.c['pippo'].type
|
||||||
|
tbl.create_column_by_example('bigbar', 11111111111)
|
||||||
|
assert 'bigbar' in tbl.table.c, tbl.table.c
|
||||||
|
assert isinstance(tbl.table.c['bigbar'].type, BIGINT), \
|
||||||
|
tbl.table.c['bigbar'].type
|
||||||
|
tbl.create_column_by_example('littlebar', -11111111111)
|
||||||
|
assert 'littlebar' in tbl.table.c, tbl.table.c
|
||||||
|
assert isinstance(tbl.table.c['littlebar'].type, BIGINT), \
|
||||||
|
tbl.table.c['littlebar'].type
|
||||||
|
|
||||||
def test_key_order(self):
|
def test_key_order(self):
|
||||||
res = self.db.query('SELECT temperature, place FROM weather LIMIT 1')
|
res = self.db.query('SELECT temperature, place FROM weather LIMIT 1')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user