Set up test suite running through setup.py
Run with python setup.py test
This commit is contained in:
parent
2291953e59
commit
425528dc17
1
setup.py
1
setup.py
@ -36,6 +36,7 @@ setup(
|
|||||||
"PyYAML >= 3.10"
|
"PyYAML >= 3.10"
|
||||||
] + py26_dependency,
|
] + py26_dependency,
|
||||||
tests_require=[],
|
tests_require=[],
|
||||||
|
test_suite='test',
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
'datafreeze = dataset.freeze.app:main',
|
'datafreeze = dataset.freeze.app:main',
|
||||||
|
|||||||
@ -2,10 +2,12 @@ import os
|
|||||||
import unittest
|
import unittest
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
from sqlalchemy.exc import IntegrityError
|
||||||
|
|
||||||
from dataset import connect
|
from dataset import connect
|
||||||
from dataset.util import DatasetException
|
from dataset.util import DatasetException
|
||||||
from sample_data import TEST_DATA, TEST_CITY_1
|
|
||||||
from sqlalchemy.exc import IntegrityError
|
from .sample_data import TEST_DATA, TEST_CITY_1
|
||||||
|
|
||||||
|
|
||||||
class DatabaseTestCase(unittest.TestCase):
|
class DatabaseTestCase(unittest.TestCase):
|
||||||
@ -241,6 +243,3 @@ class TableTestCase(unittest.TestCase):
|
|||||||
assert 'foo' in tbl.table.c, tbl.table.c
|
assert 'foo' in tbl.table.c, tbl.table.c
|
||||||
assert FLOAT == type(tbl.table.c['foo'].type), tbl.table.c['foo'].type
|
assert FLOAT == type(tbl.table.c['foo'].type), tbl.table.c['foo'].type
|
||||||
assert 'foo' in tbl.columns, tbl.columns
|
assert 'foo' in tbl.columns, tbl.columns
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
unittest.main()
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user