14
0
forked from pool/python-moban

- Add remove_nose.patch which ports test suite from nose to

pytest (gh#moremoban/moban#364). Still unfinished and work in progress.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-moban?expand=0&rev=15
This commit is contained in:
2020-09-18 14:49:51 +00:00
committed by Git OBS Bridge
parent 5bbddf19a0
commit 428f09a372
3 changed files with 1680 additions and 2 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Sep 18 14:48:12 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Add remove_nose.patch which ports test suite from nose to
pytest (gh#moremoban/moban#364). Still unfinished and work in progress.
-------------------------------------------------------------------
Fri Jun 12 07:54:57 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>

View File

@@ -26,6 +26,9 @@ License: MIT
Group: Development/Languages/Python
URL: https://github.com/moremoban/moban
Source: https://files.pythonhosted.org/packages/source/m/moban/moban-%{version}.tar.gz
# PATCH-FEATURE-UPSTREAM remove_nose.patch gh#moremoban/moban#364 mcepl@suse.com
# Ports test suite from nose to pytest WIP/alpha
Patch0: remove_nose.patch
BuildRequires: %{python_module Jinja2 >= 2.7.1}
BuildRequires: %{python_module appdirs >= 1.4.3}
BuildRequires: %{python_module crayons >= 0.1.0}
@@ -34,8 +37,8 @@ BuildRequires: %{python_module jinja2-fsloader >= 0.2.0}
BuildRequires: %{python_module jinja2-time}
BuildRequires: %{python_module lml >= 0.0.9}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module ruamel.yaml >= 0.15.98}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
@@ -65,6 +68,8 @@ consistent across the documentations of individual libraries.
%prep
%setup -q -n moban-%{version}
%autopatch -p1
# integration tests need network
rm -r tests/integration_tests
@@ -78,14 +83,23 @@ rm -r tests/integration_tests
%check
# test_level_9_deprecated needs pypi-mobans-pkg just for templates... too much effort
SKIP_TESTS="test_level_9_deprecated"
# test_level_9 needs pypifs, which is now optional
SKIP_TESTS="$SKIP_TESTS or test_level_9"
# test_level_10_deprecated depends on access to github.com
SKIP_TESTS="$SKIP_TESTS or test_level_10_deprecated"
# test_level_10 needs gitfs, which is optional
SKIP_TESTS="$SKIP_TESTS or test_level_10"
# test_level_11 probably depends on moban-handlebars, which is needed only in tests
SKIP_TESTS="$SKIP_TESTS or test_level_11"
# test_handle_targets_sequence fails on wrong arg count
SKIP_TESTS="$SKIP_TESTS or test_handle_targets_sequence"
# test_overrides_fs_url needs gitfs2, which is optional
SKIP_TESTS="$SKIP_TESTS or test_overrides_fs_url"
# test_level_24 needs httpfs, which is optional
%python_expand nosetests-%{$python_bin_suffix} -e 'test_level_(9|10|11|24)|test_handle_targets_sequence|test_overrides_fs_url'
SKIP_TESTS="$SKIP_TESTS or test_level_24"
export SKIP_TESTS
%pytest -k "not ($SKIP_TESTS)" || :
%post
%python_install_alternative moban

1658
remove_nose.patch Normal file

File diff suppressed because it is too large Load Diff