- Use pytest instead of nose - Add use_pytest.patch OBS-URL: https://build.opensuse.org/request/show/800051 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-purl?expand=0&rev=6
65 lines
1.7 KiB
Diff
65 lines
1.7 KiB
Diff
diff -ru a/makefile b/makefile
|
||
--- a/makefile 2019-03-10 21:51:02.000000000 +0100
|
||
+++ b/makefile 2020-05-04 14:33:39.928123174 +0200
|
||
@@ -3,7 +3,7 @@
|
||
python setup.py develop
|
||
|
||
test:
|
||
- nosetests
|
||
+ pytest tests/
|
||
|
||
package: clean
|
||
# Test these packages in a fresh virtualenvs:
|
||
Only in b: .pytest_cache
|
||
diff -ru a/requirements.txt b/requirements.txt
|
||
--- a/requirements.txt 2019-03-10 21:51:02.000000000 +0100
|
||
+++ b/requirements.txt 2020-05-04 14:33:54.216151730 +0200
|
||
@@ -4,5 +4,5 @@
|
||
wheel==0.33.1
|
||
|
||
# Testing
|
||
-nose==1.3.7
|
||
+pytest
|
||
tox==3.7.0
|
||
diff -ru a/runtests.sh b/runtests.sh
|
||
--- a/runtests.sh 2019-03-10 21:51:02.000000000 +0100
|
||
+++ b/runtests.sh 2020-05-04 14:34:09.352181984 +0200
|
||
@@ -1,5 +1,3 @@
|
||
#!/usr/bin/env bash
|
||
|
||
-# The doctests only work in Python2.* due to unicode issues that I
|
||
-# don't know how to solve.
|
||
-nosetests --with-doctest --doctest-extension=rst -s $@
|
||
+pytest tests/
|
||
diff -ru a/tests/expansion_tests.py b/tests/expansion_tests.py
|
||
--- a/tests/expansion_tests.py 2019-03-10 21:51:02.000000000 +0100
|
||
+++ b/tests/expansion_tests.py 2020-05-04 14:29:32.167627853 +0200
|
||
@@ -1,8 +1,6 @@
|
||
# -*- coding: utf-8 -*-
|
||
import collections
|
||
|
||
-from nose.tools import eq_
|
||
-
|
||
from purl.template import expand
|
||
|
||
# Define variables as in the RFC (http://tools.ietf.org/html/rfc6570)
|
||
@@ -117,7 +115,7 @@
|
||
|
||
|
||
def assert_expansion(template, fields, expected):
|
||
- eq_(expand(template, fields), expected)
|
||
+ assert expand(template, fields) == expected
|
||
|
||
|
||
def test_expansion():
|
||
diff -ru a/tox.ini b/tox.ini
|
||
--- a/tox.ini 2019-03-10 21:51:02.000000000 +0100
|
||
+++ b/tox.ini 2020-05-04 14:30:03.975691441 +0200
|
||
@@ -7,5 +7,5 @@
|
||
envlist = py26, py27, py34, pypy
|
||
|
||
[testenv]
|
||
-commands = nosetests []
|
||
+commands = pytest
|
||
deps = -r{toxinidir}/requirements.txt
|