Hello community,
here is the log from the commit of package python-entrypoint2 for
openSUSE:Leap:15.2 checked in at 2020-03-29 14:56:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-entrypoint2 (Old)
and /work/SRC/openSUSE:Leap:15.2/.python-entrypoint2.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-entrypoint2"
Sun Mar 29 14:56:33 2020 rev:14 rq:789314 version:0.2
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-entrypoint2/python-entrypoint2.changes
2020-03-15 13:35:54.406821825 +0100
+++
/work/SRC/openSUSE:Leap:15.2/.python-entrypoint2.new.3160/python-entrypoint2.changes
2020-03-29 14:56:38.839202534 +0200
@@ -1,0 +2,6 @@
+Fri Mar 27 13:08:03 UTC 2020 - Paolo Stivanin <[email protected]>
+
+- Use pytest instead of nose
+- Add remove_nose.patch
+
+-------------------------------------------------------------------
New:
----
remove_nose.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-entrypoint2.spec ++++++
--- /var/tmp/diff_new_pack.w6C0uV/_old 2020-03-29 14:56:40.375203731 +0200
+++ /var/tmp/diff_new_pack.w6C0uV/_new 2020-03-29 14:56:40.411203759 +0200
@@ -33,6 +33,8 @@
Group: Development/Languages/Python
URL: https://github.com/ponty/entrypoint2
Source:
https://github.com/ponty/entrypoint2/archive/%{version}.tar.gz#/entrypoint2-%{version}.tar.gz
+# https://github.com/ponty/entrypoint2/pull/6
+Patch0: remove_nose.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -42,8 +44,8 @@
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module decorator}
BuildRequires: %{python_module entrypoint2 = %{version}}
-BuildRequires: %{python_module nose}
BuildRequires: %{python_module path.py}
+BuildRequires: %{python_module pytest}
%endif
%python_subpackages
@@ -53,6 +55,7 @@
%prep
%setup -q -n entrypoint2-%{version}
+%patch0 -p1
# argparse is py2.6 or older
sed -i -e '/argparse/d' requirements.txt
@@ -69,7 +72,7 @@
%if %{with test}
%check
-%python_expand nosetests-%{$python_bin_suffix}
+%pytest tests/test.py
%endif
%if !%{with test}
++++++ remove_nose.patch ++++++
diff -ru a/requirements-test.txt b/requirements-test.txt
--- a/requirements-test.txt 2020-03-27 14:00:49.587654335 +0100
+++ b/requirements-test.txt 2020-03-27 14:01:04.815678385 +0100
@@ -1,5 +1,4 @@
tox
-nose
coverage
path.py
easyprocess
\ No newline at end of file
diff -ru a/setup.py b/setup.py
--- a/setup.py 2020-03-27 14:00:49.587654335 +0100
+++ b/setup.py 2020-03-27 14:01:04.815678385 +0100
@@ -56,7 +56,6 @@
license='BSD',
packages=PACKAGES,
# include_package_data=True,
- # test_suite='nose.collector',
# zip_safe=False,
install_requires=install_requires,
# **extra
Only in entrypoint2-0.2: setup.py.orig
diff -ru a/tests/test.py b/tests/test.py
--- a/tests/test.py 2020-03-27 14:00:49.587654335 +0100
+++ b/tests/test.py 2020-03-27 14:01:08.703684524 +0100
@@ -1,5 +1,4 @@
from easyprocess import EasyProcess
-from nose.tools import eq_, ok_
from path import Path
import sys
@@ -13,133 +12,138 @@
PY3 = sys.version_info[0] >= 3
+def ported_eq(a, b, msg=None):
+ if not a == b:
+ raise AssertionError(msg or "%r != %r" % (a, b))
+
+
def test_1_call():
import example1
- eq_(example1.f(3), 3)
- eq_('description' in example1.f.__doc__, True)
- eq_(example1.f.__name__, 'f')
+ ported_eq(example1.f(3), 3)
+ ported_eq('description' in example1.f.__doc__, True)
+ ported_eq(example1.f.__name__, 'f')
def test_2_call():
import example2
- eq_(example2.f(5, 1), 6)
- eq_(example2.f.__doc__, None)
- eq_(example2.f.__name__, 'f')
+ ported_eq(example2.f(5, 1), 6)
+ ported_eq(example2.f.__doc__, None)
+ ported_eq(example2.f.__name__, 'f')
def test_3_call():
import example3
- eq_(example3.f(), 7)
- eq_(example3.f.__doc__, None)
- eq_(example3.f.__name__, 'f')
+ ported_eq(example3.f(), 7)
+ ported_eq(example3.f.__doc__, None)
+ ported_eq(example3.f.__name__, 'f')
def test_1_cli():
cmd = [python, example1_py, '5']
p = EasyProcess(cmd).call()
- eq_(p.return_code, 0)
- eq_(p.stdout, '')
- eq_(p.stderr, '')
+ ported_eq(p.return_code, 0)
+ ported_eq(p.stdout, '')
+ ported_eq(p.stderr, '')
cmd = [python, example1_py, '5', '--two', '7', '--debug']
p = EasyProcess(cmd).call()
- eq_(p.return_code, 0)
- eq_(p.stdout, '')
- eq_(p.stderr, '')
+ ported_eq(p.return_code, 0)
+ ported_eq(p.stdout, '')
+ ported_eq(p.stderr, '')
cmd = [python, example1_py, '5', '--three', '-t', '2', '--debug']
p = EasyProcess(cmd).call()
- eq_(p.return_code, 0)
- eq_(p.stdout, '')
- eq_(p.stderr, '')
+ ported_eq(p.return_code, 0)
+ ported_eq(p.stdout, '')
+ ported_eq(p.stderr, '')
cmd = [python, example1_py, '5', '-t', 'x']
p = EasyProcess(cmd).call()
- eq_(p.return_code > 0, 1)
- eq_(p.stdout, '')
- eq_(p.stderr != '', 1)
+ ported_eq(p.return_code > 0, 1)
+ ported_eq(p.stdout, '')
+ ported_eq(p.stderr != '', 1)
cmd = [python, example1_py, '-t', '1', '5', '--debug']
p = EasyProcess(cmd).call()
- eq_(p.return_code, 0)
- eq_(p.stdout, '')
- eq_(p.stderr, '')
+ ported_eq(p.return_code, 0)
+ ported_eq(p.stdout, '')
+ ported_eq(p.stderr, '')
def test_2_cli():
cmd = [python, example2_py, '5', '2']
p = EasyProcess(cmd).call()
- eq_(p.return_code, 0)
- eq_(p.stdout, '')
- eq_(p.stderr, '')
+ ported_eq(p.return_code, 0)
+ ported_eq(p.stdout, '')
+ ported_eq(p.stderr, '')
cmd = [python, example2_py, '--debug', '5', '2']
p = EasyProcess(cmd).call()
- eq_(p.return_code, 0)
- eq_(p.stdout, '')
- ok_('root - DEBUG - 5' in p.stderr)
+ ported_eq(p.return_code, 0)
+ ported_eq(p.stdout, '')
+ assert 'root - DEBUG - 5' in p.stderr
def test_3_cli():
cmd = [python, example3_py]
p = EasyProcess(cmd).call()
- eq_(p.return_code, 0)
- eq_(p.stdout, '')
- eq_(p.stderr, '')
+ ported_eq(p.return_code, 0)
+ ported_eq(p.stdout, '')
+ ported_eq(p.stderr, '')
def test_1_ver():
cmd = [python, example1_py, '--version']
p = EasyProcess(cmd).call()
if PY3:
- eq_(p.stderr, '')
- eq_(p.stdout, '3.2')
+ ported_eq(p.stderr, '')
+ ported_eq(p.stdout, '3.2')
else:
- eq_(p.stdout, '')
- eq_(p.stderr, '3.2')
- eq_(p.return_code, 0)
+ ported_eq(p.stdout, '')
+ ported_eq(p.stderr, '3.2')
+ ported_eq(p.return_code, 0)
def test_2_ver():
cmd = [python, example2_py, '--version']
p = EasyProcess(cmd).call()
if PY3:
- eq_(p.stderr, '')
- eq_(p.stdout, '1.2')
+ ported_eq(p.stderr, '')
+ ported_eq(p.stdout, '1.2')
else:
- eq_(p.stdout, '')
- eq_(p.stderr, '1.2')
- eq_(p.return_code, 0)
+ ported_eq(p.stdout, '')
+ ported_eq(p.stderr, '1.2')
+ ported_eq(p.return_code, 0)
def test_3_ver():
cmd = [python, example3_py, '--version']
p = EasyProcess(cmd).call()
- eq_(p.stdout, '')
- ok_(p.stderr)
- ok_(p.return_code != 0)
+ ported_eq(p.stdout, '')
+ assert p.stderr
+ assert p.return_code != 0
def test_1_help():
cmd = [python, example1_py, '--help']
p = EasyProcess(cmd).call()
- eq_(p.stderr, '')
- eq_(p.return_code, 0)
- eq_('one' in p.stdout, 1)
- eq_('--two' in p.stdout, 1)
- eq_('-t' in p.stdout, 1)
- eq_('--three' in p.stdout, 1)
+ ported_eq(p.stderr, '')
+ ported_eq(p.return_code, 0)
+ ported_eq('one' in p.stdout, 1)
+ ported_eq('--two' in p.stdout, 1)
+ ported_eq('-t' in p.stdout, 1)
+ ported_eq('--three' in p.stdout, 1)
def test_2_help():
cmd = [python, example2_py, '--help']
p = EasyProcess(cmd).call()
- eq_(p.stderr, '')
- eq_(p.return_code, 0)
+ ported_eq(p.stderr, '')
+ ported_eq(p.return_code, 0)
def test_3_help():
cmd = [python, example3_py, '--help']
p = EasyProcess(cmd).call()
- eq_(p.stderr, '')
- eq_(p.return_code, 0)
+ ported_eq(p.stderr, '')
+ ported_eq(p.return_code, 0)
diff -ru a/tox.ini b/tox.ini
--- a/tox.ini 2020-03-27 14:00:49.587654335 +0100
+++ b/tox.ini 2020-03-27 14:01:04.815678385 +0100
@@ -8,12 +8,12 @@
[testenv]
deps=
- nose
+ pytest
easyprocess
path.py
setenv=
PYTHONPATH=
changedir=tests
-commands=nosetests --verbose
+commands=pytest