summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/python-lzo/files/python-lzo-1.14-pytest.patch')
-rw-r--r--dev-python/python-lzo/files/python-lzo-1.14-pytest.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/dev-python/python-lzo/files/python-lzo-1.14-pytest.patch b/dev-python/python-lzo/files/python-lzo-1.14-pytest.patch
new file mode 100644
index 000000000000..2abaab19aab5
--- /dev/null
+++ b/dev-python/python-lzo/files/python-lzo-1.14-pytest.patch
@@ -0,0 +1,71 @@
+https://github.com/jd-boyd/python-lzo/pull/66
+
+diff --git a/setup.py b/setup.py
+index 033692d..e7e383d 100644
+--- a/setup.py
++++ b/setup.py
+@@ -33,7 +33,7 @@ class TestCommand(Command):
+ raise SystemExit(
+ subprocess.call([sys.executable,
+ '-m',
+- 'nose']))
++ 'pytest']))
+
+
+ if sys.platform == "win32":
+@@ -91,7 +91,7 @@ setup_args = get_kw(
+ maintainer_email="jdboyd@jdboyd.net",
+ url="https://github.com/jd-boyd/python-lzo",
+ license="GNU General Public License (GPL)",
+- tests_require=['nose'],
++ tests_require=['pytest'],
+ cmdclass={
+ 'test': TestCommand
+ },
+diff --git a/tests/test.py b/tests/test_lzo.py
+similarity index 88%
+rename from tests/test.py
+rename to tests/test_lzo.py
+index af761d9..b9d5c88 100644
+--- a/tests/test.py
++++ b/tests/test_lzo.py
+@@ -32,6 +32,7 @@
+
+ from __future__ import print_function
+
++import pytest
+ import sys, string
+
+ # update sys.path when running in the build directory
+@@ -94,22 +95,20 @@ def test_version():
+ assert pkg_version == mod_version, \
+ "%r != %r" %(pkg_version, mod_version)
+
+-def test_lzo():
+- yield gen, b"aaaaaaaaaaaaaaaaaaaaaaaa"
+- yield gen, b"abcabcabcabcabcabcabcabc"
+- yield gen, b"abcabcabcabcabcabcabcabc", 9
++@pytest.mark.parametrize("src, level", [(b"aaaaaaaaaaaaaaaaaaaaaaaa", 1), (b"abcabcabcabcabcabcabcabc", 1), (b"abcabcabcabcabcabcabcabc", 9)])
++def test_lzo(src, level):
++ gen(src, level)
+
+-
+-def test_lzo_raw():
+- yield gen_raw, b"aaaaaaaaaaaaaaaaaaaaaaaa"
+- yield gen_raw, b"abcabcabcabcabcabcabcabc"
+- yield gen_raw, b"abcabcabcabcabcabcabcabc", 9
++@pytest.mark.parametrize("src, level", [(b"aaaaaaaaaaaaaaaaaaaaaaaa", 1), (b"abcabcabcabcabcabcabcabc", 1), (b"abcabcabcabcabcabcabcabc", 9)])
++def test_lzo_raw(src, level):
++ gen_raw(src, level)
+
+
+ def test_lzo_empty():
+- yield gen, b""
+- yield gen_raw, b""
++ gen(b"")
+
++def test_lzo_empty_raw():
++ gen_raw(b"")
+
+ def test_lzo_big():
+ gen(b" " * 131072)