SHA256
1
0
forked from pool/python-sh

Accepting request 1118203 from devel:languages:python

- Use pytest for running tests

OBS-URL: https://build.opensuse.org/request/show/1118203
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sh?expand=0&rev=16
This commit is contained in:
Ana Guerrero 2023-10-17 18:22:35 +00:00 committed by Git OBS Bridge
commit e41335fd72
2 changed files with 17 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Oct 17 06:31:32 UTC 2023 - Daniel Garcia Moreno <daniel.garcia@suse.com>
- Use pytest for running tests
-------------------------------------------------------------------
Thu Sep 7 11:16:26 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@ -26,7 +26,7 @@ URL: https://github.com/amoffat/sh
Source: https://files.pythonhosted.org/packages/source/s/sh/sh-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core}
BuildRequires: %{python_module testsuite}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@ -55,7 +55,17 @@ sh is not a collection of system commands implemented in Python.
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pyunittest -v test
export SH_TESTS_RUNNING=1
export SH_TESTS_USE_SELECT=0
export LANG=C
# disable broken tests in obs environment
donttest="test_stringio_output"
donttest+=" or test_environment"
donttest+=" or test_no_interfere1"
donttest+=" or test_set_in_parent_function"
donttest+=" or test_basic"
donttest+=" or test_multiline_defaults"
%pytest -k "not ($donttest)"
%files %{python_files}
%license LICENSE.txt