From 96f57f161a2e21062a6827abc93a04bd6eba0ead Mon Sep 17 00:00:00 2001 From: conorreid Date: Fri, 21 Jun 2019 11:49:01 -0400 Subject: [PATCH] added tests for big int vs integer check --- test/test_dataset.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/test_dataset.py b/test/test_dataset.py index 99521ce..1e73918 100644 --- a/test/test_dataset.py +++ b/test/test_dataset.py @@ -6,7 +6,7 @@ import os import unittest 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 dataset import connect @@ -441,6 +441,14 @@ class TableTestCase(unittest.TestCase): assert 'pippo' in tbl.table.c, tbl.table.c assert isinstance(tbl.table.c['pippo'].type, TEXT), \ 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): res = self.db.query('SELECT temperature, place FROM weather LIMIT 1')