From 16cc3e33e7ff4cf65ad0d3de58778dadf6e430dd Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 9 Jul 2014 15:50:17 -0400 Subject: [PATCH] - Fixed bug where "python setup.py test" wasn't calling into distutils appropriately, and errors would be emitted at the end of the test suite. Conflicts: doc/build/changelog/changelog_09.rst --- doc/build/changelog/changelog_09.rst | 8 ++++++++ lib/sqlalchemy/testing/distutils_run.py | 10 ++++++++++ setup.py | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 lib/sqlalchemy/testing/distutils_run.py diff --git a/doc/build/changelog/changelog_09.rst b/doc/build/changelog/changelog_09.rst index d202fe804b..9fcb0c3e31 100644 --- a/doc/build/changelog/changelog_09.rst +++ b/doc/build/changelog/changelog_09.rst @@ -23,6 +23,14 @@ `synchronize_session='fetch'`; a warning is now emitted. In 1.0 this will be promoted to a full exception. + .. change:: + :tags: bug, tests + :versions: 1.0.0 + + Fixed bug where "python setup.py test" wasn't calling into + distutils appropriately, and errors would be emitted at the end + of the test suite. + .. change:: :tags: feature, postgresql :versions: 1.0.0 diff --git a/lib/sqlalchemy/testing/distutils_run.py b/lib/sqlalchemy/testing/distutils_run.py new file mode 100644 index 0000000000..d8f8f59315 --- /dev/null +++ b/lib/sqlalchemy/testing/distutils_run.py @@ -0,0 +1,10 @@ +"""Quick and easy way to get setup.py test to run py.test without any +custom setuptools/distutils code. + +""" +import unittest +import pytest + +class TestSuite(unittest.TestCase): + def test_sqlalchemy(self): + pytest.main() diff --git a/setup.py b/setup.py index ae4f8416c6..81e3888744 100644 --- a/setup.py +++ b/setup.py @@ -129,7 +129,7 @@ def run_setup(with_cext): license="MIT License", cmdclass=cmdclass, tests_require=['pytest >= 2.5.2', 'mock'], - test_suite="pytest.main", + test_suite="sqlalchemy.testing.distutils_run", long_description=readme, classifiers=[ "Development Status :: 5 - Production/Stable", -- 2.47.3