Update to 4.3.1

This commit is contained in:
Miro Hrončok 2019-03-16 14:19:02 +01:00
parent ed8c0c8802
commit b55b1f5a0c
3 changed files with 7 additions and 70 deletions

View File

@ -1,63 +0,0 @@
From 5505826db921b0e46c30004ea20b6bf6e478e683 Mon Sep 17 00:00:00 2001
From: Anthony Sottile <asottile@umich.edu>
Date: Fri, 15 Feb 2019 17:34:31 -0800
Subject: [PATCH] Fix python3.8 / pypy failures
---
testing/code/test_source.py | 11 ++++++++---
testing/test_skipping.py | 5 ++++-
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/testing/code/test_source.py b/testing/code/test_source.py
index 0103acb702..fc5eaed041 100644
--- a/testing/code/test_source.py
+++ b/testing/code/test_source.py
@@ -560,7 +560,6 @@ def test_oneline_and_comment():
assert str(source) == "raise ValueError"
-@pytest.mark.xfail(hasattr(sys, "pypy_version_info"), reason="does not work on pypy")
def test_comments():
source = '''def test():
"comment 1"
@@ -576,9 +575,15 @@ def test_comments():
'''
for line in range(2, 6):
assert str(getstatement(line, source)) == " x = 1"
- for line in range(6, 10):
+ if sys.version_info >= (3, 8) or hasattr(sys, "pypy_version_info"):
+ tqs_start = 8
+ else:
+ tqs_start = 10
+ assert str(getstatement(10, source)) == '"""'
+ for line in range(6, tqs_start):
assert str(getstatement(line, source)) == " assert False"
- assert str(getstatement(10, source)) == '"""'
+ for line in range(tqs_start, 10):
+ assert str(getstatement(line, source)) == '"""\ncomment 4\n"""'
def test_comment_in_statement():
diff --git a/testing/test_skipping.py b/testing/test_skipping.py
index b2a515f11c..33878c8f47 100644
--- a/testing/test_skipping.py
+++ b/testing/test_skipping.py
@@ -910,7 +910,6 @@ def test_foo():
result.stdout.fnmatch_lines(["ERROR*test_foo*"])
-@pytest.mark.xfail("hasattr(sys, 'pypy_version_info')")
def test_errors_in_xfail_skip_expressions(testdir):
testdir.makepyfile(
"""
@@ -931,6 +930,10 @@ def test_func():
if sys.platform.startswith("java"):
# XXX report this to java
markline = "*" + markline[8:]
+ elif hasattr(sys, "pypy_version_info") and sys.pypy_version_info < (6,):
+ markline = markline[5:]
+ elif sys.version_info >= (3, 8) or hasattr(sys, "pypy_version_info"):
+ markline = markline[4:]
result.stdout.fnmatch_lines(
[
"*ERROR*test_nameerror*",

View File

@ -2,21 +2,18 @@
%global pylib_version 1.5.0 %global pylib_version 1.5.0
Name: pytest Name: pytest
Version: 4.3.0 Version: 4.3.1
Release: 1%{?dist} Release: 1%{?dist}
Summary: Simple powerful testing with Python Summary: Simple powerful testing with Python
License: MIT License: MIT
URL: https://pytest.org URL: https://pytest.org
Source0: %{pypi_source} Source0: %{pypi_source}
# Python 3.8 compatibility in tests
Patch1: https://github.com/pytest-dev/pytest/pull/4804.patch
# Don't override our PYTHONPATH in tests # Don't override our PYTHONPATH in tests
Patch2: https://github.com/pytest-dev/pytest/pull/4914.patch Patch1: https://github.com/pytest-dev/pytest/pull/4914.patch
# Update one call to Sphinx 2.0 # Update one call to Sphinx 2.0
Patch3: https://github.com/pytest-dev/pytest/pull/4922.patch Patch2: https://github.com/pytest-dev/pytest/pull/4922.patch
# The test in this specfile use pytest-timeout # The test in this specfile use pytest-timeout
# When building pytest for the first time with new Python version # When building pytest for the first time with new Python version
@ -209,6 +206,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} \
%{python3_sitelib}/__pycache__/pytest.* %{python3_sitelib}/__pycache__/pytest.*
%changelog %changelog
* Sat Mar 16 2019 Miro Hrončok <mhroncok@redhat.com> - 4.3.1-1
- Update to 4.3.1
* Tue Mar 12 2019 Miro Hrončok <mhroncok@redhat.com> - 4.3.0-1 * Tue Mar 12 2019 Miro Hrončok <mhroncok@redhat.com> - 4.3.0-1
- Update to 4.3.0 and fix FTBFS (#1671167, #1687384) - Update to 4.3.0 and fix FTBFS (#1671167, #1687384)

View File

@ -1 +1 @@
SHA512 (pytest-4.3.0.tar.gz) = 67894dc6c7001290e3372b5015227cf800c02d40ff28f76fad1249bd866f25c2368d8f0895d7c97a6b3318608f88e44db0bff723e7aeef79e380227cd7ec147e SHA512 (pytest-4.3.1.tar.gz) = 5c76100b9efc9176803807a54ff25bfaba065fe3e8fea28b9b2f3ade289056d174e0cc4e1f399eba4ee8642e8990f43f5dc68b59cf55b7d81a43cd7cb363f542