forked from pool/python-pyftpdlib
Accepting request 858115 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/858115 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pyftpdlib?expand=0&rev=14
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 18 16:29:52 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||
|
||||
- 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 <jayvdb@gmail.com>
|
||||
|
||||
|
@@ -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 <<EOF
|
||||
[pytest]
|
||||
addopts =
|
||||
-rs -v
|
||||
-k "not ($donttest)"
|
||||
$ignorebuild
|
||||
EOF
|
||||
%{python_expand # pytest macro does not work. The tests parse CLI args and fail if there are any unknown program args
|
||||
export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
||||
export PYTHONDONTWRITEBYTECODE=1
|
||||
# https://github.com/giampaolo/pyftpdlib/issues/478
|
||||
export TZ=GMT+1
|
||||
$python -m pytest
|
||||
}
|
||||
|
||||
%post
|
||||
%python_install_alternative ftpbench
|
||||
|
Reference in New Issue
Block a user