Update to 4.4.1.

Remove test dependencies on python2-hypothesis and python2-twisted (see PR#10).
This commit is contained in:
Thomas Moschny 2019-04-16 10:43:31 +02:00
parent b55b1f5a0c
commit 983595c4ca
5 changed files with 36 additions and 86 deletions

View File

@ -1,42 +0,0 @@
From d32ab6029feb178df664e0d347e234cc4480eb7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
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 <nicoddemus@gmail.com>
---
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*"])

View File

@ -1,32 +0,0 @@
From 134b957bf42ef92f892ace04651c87ab6d09999f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
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",

23
5045.patch Normal file
View File

@ -0,0 +1,23 @@
From 77526f412c46099785f567a49edbeddb6688fa60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= <mimi.vx@gmail.com>
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).

View File

@ -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 <thomas.moschny@gmx.de> - 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 <mhroncok@redhat.com> - 4.3.1-1
- Update to 4.3.1

View File

@ -1 +1 @@
SHA512 (pytest-4.3.1.tar.gz) = 5c76100b9efc9176803807a54ff25bfaba065fe3e8fea28b9b2f3ade289056d174e0cc4e1f399eba4ee8642e8990f43f5dc68b59cf55b7d81a43cd7cb363f542
SHA512 (pytest-4.4.1.tar.gz) = a4bc18fe7d8db5433d4d52c0ced38d3d0e6a785710bdc772e007fb1f0f516db2267e608845e075ce4d69a5e71a5e741cc6d84b04622e0a04bd2ad3b6576a1473