Compare commits

...

No commits in common. "c8-stream-3.8" and "c8-beta-stream-3.9" have entirely different histories.

4 changed files with 114 additions and 131 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/pytest-4.6.6.tar.gz
SOURCES/pytest-6.0.2.tar.gz

View File

@ -1 +1 @@
6b2e5766b509e9351c457f3d48c665a8e6842e87 SOURCES/pytest-4.6.6.tar.gz
bc14d7c0f9c0a8299ffdc5a7c0bec1563b4052ac SOURCES/pytest-6.0.2.tar.gz

View File

@ -1,69 +0,0 @@
From 5276d4e2b23dcefeb0cba419926c9006859d9011 Mon Sep 17 00:00:00 2001
From: Lumir Balhar <lbalhar@redhat.com>
Date: Mon, 2 Dec 2019 13:55:11 +0100
Subject: [PATCH] Disable test with hypothesis when it's not available
---
testing/python/metafunc.py | 31 +++++++++++++++++++------------
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/testing/python/metafunc.py b/testing/python/metafunc.py
index d907878..c79d780 100644
--- a/testing/python/metafunc.py
+++ b/testing/python/metafunc.py
@@ -4,9 +4,8 @@ import sys
import textwrap
import attr
-import hypothesis
+
import six
-from hypothesis import strategies
import pytest
from _pytest import fixtures
@@ -15,6 +14,13 @@ from _pytest.warnings import SHOW_PYTEST_WARNINGS_ARG
PY3 = sys.version_info >= (3, 0)
+try:
+ from hypothesis import strategies
+ import hypothesis
+except ImportError:
+ with_hypothesis = False
+else:
+ with_hypothesis = True
class TestMetafunc(object):
def Metafunc(self, func, config=None):
@@ -196,16 +202,17 @@ class TestMetafunc(object):
assert metafunc._calls[2].id == "x1-a"
assert metafunc._calls[3].id == "x1-b"
- @hypothesis.given(strategies.text() | strategies.binary())
- @hypothesis.settings(
- deadline=400.0
- ) # very close to std deadline and CI boxes are not reliable in CPU power
- def test_idval_hypothesis(self, value):
- from _pytest.python import _idval
-
- escaped = _idval(value, "a", 6, None, item=None, config=None)
- assert isinstance(escaped, six.text_type)
- escaped.encode("ascii")
+ if with_hypothesis:
+ @hypothesis.given(strategies.text() | strategies.binary())
+ @hypothesis.settings(
+ deadline=400.0
+ ) # very close to std deadline and CI boxes are not reliable in CPU power
+ def test_idval_hypothesis(self, value):
+ from _pytest.python import _idval
+
+ escaped = _idval(value, "a", 6, None, item=None, config=None)
+ assert isinstance(escaped, six.text_type)
+ escaped.encode("ascii")
def test_unicode_idval(self):
"""This tests that Unicode strings outside the ASCII character set get
--
2.23.0

View File

@ -1,30 +1,73 @@
Name: pytest
Version: 4.6.6
Release: 3%{?dist}
Version: 6.0.2
Release: 2%{?dist}
Summary: Simple powerful testing with Python
License: MIT
URL: https://pytest.org
Source0: %{pypi_source}
Patch0: Disable-test-with-hypothesis-when-it-s-not-available.patch
# The test in this specfile use pytest-timeout
# When building pytest for the first time with new Python version
# we might not yet have all the BRs, those conditionals allow us to do that.
# This can be used to disable all tests for faster bootstrapping
# RHEL: Disabled due to missing dependencies
%bcond_with tests
# Only disabling the optional tests is a more complex but careful approach
# Pytest will skip the related tests, so we only conditionalize the BRs
# This bcond is ignored when tests are disabled
%bcond_without optional_tests
# To run the tests in %%check we use pytest-timeout
# When building pytest for the first time with new Python version
# that is not possible as it depends on pytest
%bcond_with timeout
# When building pytest for the first time with new Python version
# we might not yet have all the BRs, this allows us to build without some that
# are likely not yet built.
# Pytest will skip the related tests, so we only conditionalize the BRs
%bcond_with optional_tests
# The bcond is ignored when tests are disabled
%bcond_without timeout
# When building pytest for the first time with new Python version
# we also don't have sphinx yet and cannot build docs.
# RHEL: Disabled due to missing dependencies
%bcond_with docs
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-rpm-macros
BuildRequires: python%{python3_pkgversion}-setuptools
# Those are also runtime deps, needed for tests and docs
# We keep them unconditionality, so we don't accidentally build pytest
# before them and get broken dependencies
BuildRequires: python%{python3_pkgversion}-attrs
BuildRequires: python%{python3_pkgversion}-iniconfig
BuildRequires: python%{python3_pkgversion}-more-itertools
BuildRequires: python%{python3_pkgversion}-packaging
BuildRequires: python%{python3_pkgversion}-pluggy >= 0.12
BuildRequires: python%{python3_pkgversion}-py >= 1.5.0
BuildRequires: python%{python3_pkgversion}-toml
BuildRequires: python%{python3_pkgversion}-wcwidth
%if %{with tests}
BuildRequires: python%{python3_pkgversion}-hypothesis
BuildRequires: python%{python3_pkgversion}-xmlschema
%if %{with optional_tests}
BuildRequires: python%{python3_pkgversion}-argcomplete
BuildRequires: python%{python3_pkgversion}-asynctest
BuildRequires: python%{python3_pkgversion}-decorator
BuildRequires: python%{python3_pkgversion}-jinja2
BuildRequires: python%{python3_pkgversion}-mock
BuildRequires: python%{python3_pkgversion}-nose
BuildRequires: python%{python3_pkgversion}-numpy
BuildRequires: python%{python3_pkgversion}-pexpect
BuildRequires: python%{python3_pkgversion}-twisted
%endif
%if %{with timeout}
BuildRequires: python%{python3_pkgversion}-pytest-timeout
%endif
%endif
%if %{with docs}
BuildRequires: %{_bindir}/rst2html
BuildRequires: python%{python3_pkgversion}-pygments-pytest
BuildRequires: python%{python3_pkgversion}-Pallets-Sphinx-Themes
BuildRequires: python%{python3_pkgversion}-sphinx
BuildRequires: python%{python3_pkgversion}-sphinx-removed-in
BuildRequires: python%{python3_pkgversion}-sphinxcontrib-trio
@ -43,51 +86,27 @@ py.test provides simple, yet powerful testing for Python.
%package -n python%{python3_pkgversion}-%{name}
Summary: Simple powerful testing with Python
BuildRequires: python%{python3_pkgversion}-atomicwrites
BuildRequires: python%{python3_pkgversion}-attrs
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-more-itertools
BuildRequires: python%{python3_pkgversion}-packaging
BuildRequires: python%{python3_pkgversion}-pluggy >= 0.12
BuildRequires: python%{python3_pkgversion}-py >= 1.5.0
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-six
BuildRequires: python%{python3_pkgversion}-wcwidth
BuildRequires: python%{python3_pkgversion}-rpm-macros
%if %{with timeout}
BuildRequires: python%{python3_pkgversion}-pytest-timeout
%endif
%if %{with optional_tests}
BuildRequires: python%{python3_pkgversion}-argcomplete
BuildRequires: python%{python3_pkgversion}-decorator
BuildRequires: python%{python3_pkgversion}-jinja2
BuildRequires: python%{python3_pkgversion}-nose
BuildRequires: python%{python3_pkgversion}-twisted
%endif
%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}}
Requires: python%{python3_pkgversion}-atomicwrites
Requires: python%{python3_pkgversion}-attrs
Requires: python%{python3_pkgversion}-more-itertools
Requires: python%{python3_pkgversion}-packaging
Requires: python%{python3_pkgversion}-pluggy >= 0.12
Requires: python%{python3_pkgversion}-py >= 1.5.0
Requires: python%{python3_pkgversion}-setuptools
Requires: python%{python3_pkgversion}-six
Requires: python%{python3_pkgversion}-wcwidth
Requires: python%{python3_pkgversion}-attrs >= 17.4
Requires: python%{python3_pkgversion}-iniconfig
Requires: python%{python3_pkgversion}-more-itertools >= 4
Requires: python%{python3_pkgversion}-packaging
Requires: python%{python3_pkgversion}-pluggy >= 0.12
Requires: python%{python3_pkgversion}-py >= 1.8.2
Requires: python%{python3_pkgversion}-setuptools
Requires: python%{python3_pkgversion}-toml
%description -n python%{python3_pkgversion}-%{name}
py.test provides simple, yet powerful testing for Python.
%prep
%autosetup -p1
%autosetup -p1 -n %{name}-%{version}
# Remove dependency of setuptools-scm
sed -i "/ *use_scm_version=.*,/d" setup.py
sed -i "s/ *setup_requires=.*/version='%{version}',/" setup.py
sed -i "s/^\s\+setuptools-scm$/version=%{version}/" setup.cfg
sed -i "s/setup(use_scm_version=.*)/setup()/" setup.py
%build
%py3_build
@ -120,14 +139,11 @@ find %{buildroot}%{python3_sitelib} \
-name '*.py' \
-exec sed -i -e '1{/^#!/d}' {} \;
%if %{with tests}
%check
PYTHONDONTWRITEBYTECODE=1 \
PATH=%{buildroot}%{_bindir}:${PATH} \
PYTHONPATH=%{buildroot}%{python3_sitelib} \
%{buildroot}%{_bindir}/pytest-%{python3_version} -r s testing \
%if %{with timeout}
--timeout=30
%endif
%global __pytest %{buildroot}%{_bindir}/pytest
%pytest testing %{?with_timeout:--timeout=30}
%endif
%files -n python%{python3_pkgversion}-%{name}
%if %{with docs}
@ -141,15 +157,51 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} \
%{_bindir}/py.test-%{python3_version}
%{python3_sitelib}/pytest-*.egg-info/
%{python3_sitelib}/_pytest/
%{python3_sitelib}/pytest.py
%{python3_sitelib}/__pycache__/pytest.*
%{python3_sitelib}/pytest/
%changelog
* Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 4.6.6-3
- Exclude unsupported i686 arch
* Wed Jan 13 2021 Tomas Orsava <torsava@redhat.com> - 6.0.2-2
- Convert from Fedora to the python39 module in RHEL8
- Resolves: rhbz#1877430
* Tue Nov 19 2019 Lumír Balhar <lbalhar@redhat.com> - 4.6.6-2
- Adjusted for Python 3.8 module in RHEL 8
* Sat Sep 12 2020 Thomas Moschny <thomas.moschny@gmx.de> - 6.0.2-1
- Update to 6.0.2.
* Thu Aug 06 2020 Miro Hrončok <mhroncok@redhat.com> - 6.0.1-1
- Update to 6.0.1 (#1862097)
* Tue Jul 28 2020 Miro Hrončok <mhroncok@redhat.com> - 6.0.0~rc1-1
- Update to 6.0.0rc1
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jun 5 2020 Thomas Moschny <thomas.moschny@gmx.de> - 5.4.3-1
- Update to 5.4.3.
* Fri May 29 2020 Miro Hrončok <mhroncok@redhat.com> - 5.4.2-1
- Update to 5.4.2 (#1707986)
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 4.6.10-3
- Rebuilt for Python 3.9
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 4.6.10-2
- Bootstrap for Python 3.9
* Fri May 08 2020 Miro Hrončok <mhroncok@redhat.com> - 4.6.10-1
- Update to 4.6.10.
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sun Jan 5 2020 Thomas Moschny <thomas.moschny@gmx.de> - 4.6.9-1
- Update to 4.6.9.
* Fri Jan 3 2020 Thomas Moschny <thomas.moschny@gmx.de> - 4.6.8-1
- Update to 4.6.8.
* Fri Dec 06 2019 Miro Hrončok <mhroncok@redhat.com> - 4.6.7-1
- Update to 4.6.7
* Fri Oct 25 2019 Thomas Moschny <thomas.moschny@gmx.de> - 4.6.6-1
- Update to 4.6.6.