From 4c952ba5ff17f75883104d7e91e155b175daab657b71bb384e740b3cf70c83ff Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 22 Dec 2020 10:14:07 +0000 Subject: [PATCH] Accepting request 856906 from home:bnavigator:branches:devel:languages:python - add ignore _build directories to pytest args to fix builds for multiple pytest flavors gh#openSUSE/python-rpm-macros#66 - fix tests failing locally because of gh#giampaolo/pyftpdlib#478 OBS-URL: https://build.opensuse.org/request/show/856906 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyftpdlib?expand=0&rev=27 --- python-pyftpdlib.changes | 7 +++++++ python-pyftpdlib.spec | 25 +++++++++++++++++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/python-pyftpdlib.changes b/python-pyftpdlib.changes index 180e148..fe5b8d6 100644 --- a/python-pyftpdlib.changes +++ b/python-pyftpdlib.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Dec 18 16:29:52 UTC 2020 - Benjamin Greiner + +- add ignore _build directories to pytest args to fix builds for + multiple pytest flavors gh#openSUSE/python-rpm-macros#66 +- fix tests failing locally because of gh#giampaolo/pyftpdlib#478 + ------------------------------------------------------------------- Sun Aug 16 04:20:40 UTC 2020 - John Vandenberg diff --git a/python-pyftpdlib.spec b/python-pyftpdlib.spec index f2e2093..db13814 100644 --- a/python-pyftpdlib.spec +++ b/python-pyftpdlib.spec @@ -69,10 +69,27 @@ write very asynchronous FTP servers with Python. # https://github.com/giampaolo/pyftpdlib/issues/386 # If they re-occur, please update the issue with backtraces, # and disable only related tests. -export PYTHONPATH=$PWD -printf '[pytest]\naddopts = -rs -v -k "not (TestFtpStoreDataTLSMixin and test_rest_on_stor) and not (TestFtpStoreDataTLSMixin and test_stor_ascii)"' > pytest.ini -# %%pytest des not work. The tests parse CLI args and fail if there are any unknown program args -%python_exec -m pytest +donttest="(TestFtpStoreDataTLSMixin and test_rest_on_stor)" +donttest+=" or (TestFtpStoreDataTLSMixin and test_stor_ascii)" +ignorebuild="--ignore build" +%{python_expand # expand to python flavor, not to the binary name, then strip the trailing _ +builddir=_build.$python_ +ignorebuild+=" --ignore ${builddir%_}" +} +cat > pytest.ini <