forked from pool/python-pyftpdlib
Accepting request 826953 from home:jayvdb:nose2pytest
- Re-activate test suite, replacing nose with pytest OBS-URL: https://build.opensuse.org/request/show/826953 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyftpdlib?expand=0&rev=25
This commit is contained in:
committed by
Git OBS Bridge
parent
3385631a2e
commit
da62920818
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Aug 16 04:20:40 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
||||||
|
|
||||||
|
- Re-activate test suite, replacing nose with pytest
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed May 20 07:26:27 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
|
Wed May 20 07:26:27 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
|
||||||
|
|
||||||
|
@@ -18,8 +18,6 @@
|
|||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
# Tests randomly fail: https://github.com/giampaolo/pyftpdlib/issues/386
|
|
||||||
%bcond_with test
|
|
||||||
%bcond_without python2
|
%bcond_without python2
|
||||||
Name: python-pyftpdlib
|
Name: python-pyftpdlib
|
||||||
Version: 1.5.6
|
Version: 1.5.6
|
||||||
@@ -29,10 +27,10 @@ License: MIT
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/giampaolo/pyftpdlib/
|
URL: https://github.com/giampaolo/pyftpdlib/
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pyftpdlib/pyftpdlib-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pyftpdlib/pyftpdlib-%{version}.tar.gz
|
||||||
BuildRequires: %{python_module nose}
|
|
||||||
BuildRequires: %{python_module psutil}
|
BuildRequires: %{python_module psutil}
|
||||||
BuildRequires: %{python_module pyOpenSSL}
|
BuildRequires: %{python_module pyOpenSSL}
|
||||||
BuildRequires: %{python_module pysendfile}
|
BuildRequires: %{python_module pysendfile}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@@ -66,11 +64,15 @@ write very asynchronous FTP servers with Python.
|
|||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
# Note: Do not remove tests. Other packages import them
|
# Note: Do not remove tests. Other packages import them
|
||||||
|
|
||||||
%if %{with test}
|
|
||||||
%check
|
%check
|
||||||
|
# Tests reported as randomly failing in 2016 against v1.5.0:
|
||||||
|
# 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
|
export PYTHONPATH=$PWD
|
||||||
%python_exec pyftpdlib/test/runner.py
|
printf '[pytest]\naddopts = -rs -v -k "not (TestFtpStoreDataTLSMixin and test_rest_on_stor) and not (TestFtpStoreDataTLSMixin and test_stor_ascii)"' > pytest.ini
|
||||||
%endif
|
# %%pytest des not work. The tests parse CLI args and fail if there are any unknown program args
|
||||||
|
%python_exec -m pytest
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%python_install_alternative ftpbench
|
%python_install_alternative ftpbench
|
||||||
|
Reference in New Issue
Block a user