From 59e437de85a9df7d227bfdca2e13fabe4b4b364297e748ed4bf39fd5329b2dbf Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Tue, 17 Oct 2023 06:45:35 +0000 Subject: [PATCH] - Use pytest for running tests OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sh?expand=0&rev=40 --- python-sh.changes | 5 +++++ python-sh.spec | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/python-sh.changes b/python-sh.changes index 2c819dd..494a099 100644 --- a/python-sh.changes +++ b/python-sh.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Oct 17 06:31:32 UTC 2023 - Daniel Garcia Moreno + +- Use pytest for running tests + ------------------------------------------------------------------- Thu Sep 7 11:16:26 UTC 2023 - Dirk Müller diff --git a/python-sh.spec b/python-sh.spec index 9a7114b..f2befb3 100644 --- a/python-sh.spec +++ b/python-sh.spec @@ -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