Set up test suite running through setup.py

Run with python setup.py test
This commit is contained in:
Stefan Wehrmeyer 2013-12-18 04:21:10 +01:00
parent 2291953e59
commit 425528dc17
2 changed files with 5 additions and 5 deletions

View File

@ -36,6 +36,7 @@ setup(
"PyYAML >= 3.10"
] + py26_dependency,
tests_require=[],
test_suite='test',
entry_points={
'console_scripts': [
'datafreeze = dataset.freeze.app:main',

View File

@ -2,10 +2,12 @@ import os
import unittest
from datetime import datetime
from sqlalchemy.exc import IntegrityError
from dataset import connect
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):
@ -241,6 +243,3 @@ class TableTestCase(unittest.TestCase):
assert 'foo' in tbl.table.c, tbl.table.c
assert FLOAT == type(tbl.table.c['foo'].type), tbl.table.c['foo'].type
assert 'foo' in tbl.columns, tbl.columns
if __name__ == '__main__':
unittest.main()