X-Git-Url: http://git.pld-linux.org/?p=packages%2Fpython-sqlalchemy.git;a=blobdiff_plain;f=python-sqlalchemy-tests.patch;h=0f361bf558bb823a74faaa0af19f163f843d794f;hp=a404e2428e2338f618a960d88695a415c9e5411e;hb=3bbbe704af167518fea7f76a2eb3d024955a2217;hpb=52cdbbadbb4c906ecbba9fb79a53c107f14049cd diff --git a/python-sqlalchemy-tests.patch b/python-sqlalchemy-tests.patch index a404e24..0f361bf 100644 --- a/python-sqlalchemy-tests.patch +++ b/python-sqlalchemy-tests.patch @@ -1,34 +1,21 @@ ---- SQLAlchemy-1.2.7/setup.py.orig 2018-04-20 22:27:50.000000000 +0200 -+++ SQLAlchemy-1.2.7/setup.py 2018-05-26 11:23:38.674698725 +0200 -@@ -81,7 +81,7 @@ +diff -urNp -x '*.orig' SQLAlchemy-1.3.23.org/setup.py SQLAlchemy-1.3.23/setup.py +--- SQLAlchemy-1.3.23.org/setup.py 2021-02-01 21:52:02.000000000 +0100 ++++ SQLAlchemy-1.3.23/setup.py 2021-03-07 23:28:59.044650527 +0100 +@@ -89,7 +89,7 @@ class PyTest(TestCommand): # not working at the time of this comment. - user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")] + user_options = [("pytest-args=", "a", "Arguments to pass to py.test")] - default_options = ["-n", "4", "-q", "--nomemory"] + default_options = ["-q", "--nomemory"] def initialize_options(self): TestCommand.initialize_options(self) -@@ -121,6 +121,13 @@ - readme = r_file.read() - - -+def get_mock_dep(): -+ try: -+ from unittest import mock -+ return [] -+ except ImportError: -+ return ['mock'] -+ - def run_setup(with_cext): - kwargs = {} - if with_cext: -@@ -139,7 +146,7 @@ - package_dir={'': 'lib'}, - license="MIT License", +@@ -159,7 +159,7 @@ def run_setup(with_cext): cmdclass=cmdclass, -- tests_require=['pytest>=2.5.2,!=3.9.1,!=3.9.2', 'mock', 'pytest-xdist'], -+ tests_require=['pytest>=2.5.2,!=3.9.1,!=3.9.2', 'pytest-xdist'] + get_mock_dep(), + tests_require=[ + "pytest>=2.5.2,!=3.9.1,!=3.9.2", +- "mock", ++ "mock;python_version<'3.3'", + "pytest-xdist", + ], long_description=readme, - classifiers=[ - "Development Status :: 5 - Production/Stable",