From: Mike Bayer Date: Sat, 13 Sep 2014 21:08:22 +0000 (-0400) Subject: - bootstrap support X-Git-Tag: rel_0_7_0~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff93b35a710620eee447bb481b15c19033b0e348;p=thirdparty%2Fsqlalchemy%2Falembic.git - bootstrap support - some workarounds to get 0.8 mostly working --- diff --git a/alembic/testing/mock.py b/alembic/testing/mock.py index f8162f84..5c8d07b1 100644 --- a/alembic/testing/mock.py +++ b/alembic/testing/mock.py @@ -1,2 +1,15 @@ +from __future__ import absolute_import + from sqlalchemy.testing import mock -from sqlalchemy.testing.mock import Mock, call, patch +from sqlalchemy.testing.mock import Mock, call + +from alembic import util, compat + +if util.sqla_09: + from sqlalchemy.testing.mock import patch +elif compat.py33: + from unittest.mock import patch +else: + from mock import patch + + diff --git a/run_tests.py b/run_tests.py new file mode 100755 index 00000000..41dba6d3 --- /dev/null +++ b/run_tests.py @@ -0,0 +1,3 @@ +from sqlalchemy.testing import runner + +runner.main() diff --git a/setup.cfg b/setup.cfg index ab40b6b8..5972b737 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,6 +11,9 @@ upload-dir = docs/build/output/html sign = 1 identity = C4DAFEE1 +[nosetests] +with-sqla_testing = true + [sqla_testing] requirement_cls=tests.requirements:DefaultRequirements diff --git a/setup.py b/setup.py index 3918034c..b9082cde 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ setup(name='alembic', packages=find_packages('.', exclude=['examples*', 'test*']), include_package_data=True, tests_require=['nose >= 0.11', 'mock'], - test_suite="nose.collector", + test_suite="sqlalchemy.testing.runner.setup_py_test", zip_safe=False, install_requires=requires, entry_points={