14
0

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:
Tomáš Chvátal
2020-08-16 07:53:43 +00:00
committed by Git OBS Bridge
parent 3385631a2e
commit da62920818
2 changed files with 13 additions and 6 deletions

View File

@@ -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>

View File

@@ -18,8 +18,6 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
# Tests randomly fail: https://github.com/giampaolo/pyftpdlib/issues/386
%bcond_with test
%bcond_without python2
Name: python-pyftpdlib
Version: 1.5.6
@@ -29,10 +27,10 @@ License: MIT
Group: Development/Languages/Python
URL: https://github.com/giampaolo/pyftpdlib/
Source: https://files.pythonhosted.org/packages/source/p/pyftpdlib/pyftpdlib-%{version}.tar.gz
BuildRequires: %{python_module nose}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module pyOpenSSL}
BuildRequires: %{python_module pysendfile}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -66,11 +64,15 @@ write very asynchronous FTP servers with Python.
%python_expand %fdupes %{buildroot}%{$python_sitelib}
# Note: Do not remove tests. Other packages import them
%if %{with test}
%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
%python_exec pyftpdlib/test/runner.py
%endif
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
%post
%python_install_alternative ftpbench