diff --git a/4914.patch b/4914.patch deleted file mode 100644 index 5d6dd5f..0000000 --- a/4914.patch +++ /dev/null @@ -1,42 +0,0 @@ -From d32ab6029feb178df664e0d347e234cc4480eb7d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Tue, 12 Mar 2019 16:28:10 +0100 -Subject: [PATCH] Fix pytest tests invocation with custom PYTHONPATH - -Fixes https://github.com/pytest-dev/pytest/issues/4913 - -Co-authored-by: Bruno Oliveira ---- - changelog/4913.trivial.rst | 1 + - testing/test_collection.py | 3 ++- - 2 files changed, 3 insertions(+), 1 deletion(-) - create mode 100644 changelog/4913.trivial.rst - -diff --git a/changelog/4913.trivial.rst b/changelog/4913.trivial.rst -new file mode 100644 -index 000000000..7846775cc ---- /dev/null -+++ b/changelog/4913.trivial.rst -@@ -0,0 +1 @@ -+Fix pytest tests invocation with custom ``PYTHONPATH``. -diff --git a/testing/test_collection.py b/testing/test_collection.py -index 97c46d8c2..37f7ad89c 100644 ---- a/testing/test_collection.py -+++ b/testing/test_collection.py -@@ -2,6 +2,7 @@ - from __future__ import division - from __future__ import print_function - -+import os - import pprint - import sys - import textwrap -@@ -1108,7 +1109,7 @@ def test_collect_pyargs_with_testpaths(testdir, monkeypatch): - """ - ) - ) -- monkeypatch.setenv("PYTHONPATH", str(testdir.tmpdir)) -+ monkeypatch.setenv("PYTHONPATH", str(testdir.tmpdir), prepend=os.pathsep) - with root.as_cwd(): - result = testdir.runpytest_subprocess() - result.stdout.fnmatch_lines(["*1 passed in*"]) diff --git a/4922.patch b/4922.patch deleted file mode 100644 index 13b6805..0000000 --- a/4922.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 134b957bf42ef92f892ace04651c87ab6d09999f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Thu, 14 Mar 2019 12:15:05 +0100 -Subject: [PATCH] Remove deprecated Sphinx directive add_description_unit() - -Partial solution for https://github.com/pytest-dev/pytest/issues/4912 ---- - changelog/4912.trivial.rst | 1 + - doc/en/conf.py | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - create mode 100644 changelog/4912.trivial.rst - -diff --git a/changelog/4912.trivial.rst b/changelog/4912.trivial.rst -new file mode 100644 -index 000000000..9c5ca6d8e ---- /dev/null -+++ b/changelog/4912.trivial.rst -@@ -0,0 +1 @@ -+Remove deprecated Sphinx directive, ``add_description_unit()``. -diff --git a/doc/en/conf.py b/doc/en/conf.py -index 74a43596e..5daa15a06 100644 ---- a/doc/en/conf.py -+++ b/doc/en/conf.py -@@ -335,7 +335,7 @@ - def setup(app): - # from sphinx.ext.autodoc import cut_lines - # app.connect('autodoc-process-docstring', cut_lines(4, what=['module'])) -- app.add_description_unit( -+ app.add_object_type( - "confval", - "confval", - objname="configuration value", diff --git a/5045.patch b/5045.patch new file mode 100644 index 0000000..2257867 --- /dev/null +++ b/5045.patch @@ -0,0 +1,23 @@ +From 77526f412c46099785f567a49edbeddb6688fa60 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= +Date: Thu, 4 Apr 2019 12:53:55 +0200 +Subject: [PATCH] Skip test_source_mtime_long_long on 32bit and lower platforms + +--- + testing/test_assertrewrite.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/testing/test_assertrewrite.py b/testing/test_assertrewrite.py +index 72bfbcc55..fb3f81770 100644 +--- a/testing/test_assertrewrite.py ++++ b/testing/test_assertrewrite.py +@@ -1232,6 +1232,9 @@ def test_simple_failure(): + result.stdout.fnmatch_lines(["*E*assert (1 + 1) == 3"]) + + ++@pytest.mark.skipif( ++ sys.maxsize <= (2 ** 31 - 1), reason="Causes OverflowError on 32bit systems" ++) + @pytest.mark.parametrize("offset", [-1, +1]) + def test_source_mtime_long_long(testdir, offset): + """Support modification dates after 2038 in rewritten files (#4903). diff --git a/pytest.spec b/pytest.spec index adaeb1d..7c63a04 100644 --- a/pytest.spec +++ b/pytest.spec @@ -2,18 +2,14 @@ %global pylib_version 1.5.0 Name: pytest -Version: 4.3.1 +Version: 4.4.1 Release: 1%{?dist} Summary: Simple powerful testing with Python License: MIT URL: https://pytest.org Source0: %{pypi_source} - -# Don't override our PYTHONPATH in tests -Patch1: https://github.com/pytest-dev/pytest/pull/4914.patch - -# Update one call to Sphinx 2.0 -Patch2: https://github.com/pytest-dev/pytest/pull/4922.patch +# https://github.com/pytest-dev/pytest/issues/5046 +Patch0: 5045.patch # The test in this specfile use pytest-timeout # When building pytest for the first time with new Python version @@ -49,11 +45,10 @@ BuildRequires: python2-atomicwrites BuildRequires: python2-attrs BuildRequires: python2-devel BuildRequires: python2-funcsigs -BuildRequires: python2-hypothesis BuildRequires: python2-mock BuildRequires: python2-more-itertools >= 4.0.0 BuildRequires: python2-pathlib2 >= 2.2.0 -BuildRequires: python2-pluggy >= 0.7 +BuildRequires: python2-pluggy >= 0.9 BuildRequires: python2-py >= %{pylib_version} BuildRequires: python2-setuptools BuildRequires: python2-setuptools_scm @@ -67,7 +62,6 @@ BuildRequires: python2-pytest-timeout BuildRequires: python2-decorator BuildRequires: python2-jinja2 BuildRequires: python2-nose -BuildRequires: python2-twisted %endif %{?python_provide:%python_provide python2-%{name}} @@ -85,7 +79,7 @@ BuildRequires: python3-attrs BuildRequires: python3-devel BuildRequires: python3-hypothesis BuildRequires: python3-more-itertools -BuildRequires: python3-pluggy >= 0.7 +BuildRequires: python3-pluggy >= 0.9 BuildRequires: python3-py >= %{pylib_version} BuildRequires: python3-setuptools BuildRequires: python3-setuptools_scm @@ -156,9 +150,12 @@ find %{buildroot}{%{python2_sitelib},%{python3_sitelib}} \ -exec sed -i -e '1{/^#!/d}' {} \; %check +# Metafunc tests use python2-hypothesis, which forms a dependency +# cycle with pytest. PATH=%{buildroot}%{_bindir}:${PATH} \ PYTHONPATH=%{buildroot}%{python2_sitelib} \ %{buildroot}%{_bindir}/pytest-%{python2_version} -r s testing \ + --ignore testing/python/metafunc.py \ %if %{with timeout} --timeout=30 %endif @@ -206,6 +203,10 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{python3_sitelib}/__pycache__/pytest.* %changelog +* Tue Apr 16 2019 Thomas Moschny - 4.4.1-1 +- Update to 4.4.1 (see PR#9). +- Remove test dependencies on python2-hypothesis and python2-twisted (see PR#10). + * Sat Mar 16 2019 Miro HronĨok - 4.3.1-1 - Update to 4.3.1 diff --git a/sources b/sources index ab933d9..ca03f16 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pytest-4.3.1.tar.gz) = 5c76100b9efc9176803807a54ff25bfaba065fe3e8fea28b9b2f3ade289056d174e0cc4e1f399eba4ee8642e8990f43f5dc68b59cf55b7d81a43cd7cb363f542 +SHA512 (pytest-4.4.1.tar.gz) = a4bc18fe7d8db5433d4d52c0ced38d3d0e6a785710bdc772e007fb1f0f516db2267e608845e075ce4d69a5e71a5e741cc6d84b04622e0a04bd2ad3b6576a1473