Compare commits

..

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

9 changed files with 150 additions and 242 deletions

View File

@ -1 +0,0 @@
1

6
.gitignore vendored
View File

@ -1,5 +1 @@
/pytest-*.zip SOURCES/pytest-4.6.6.tar.gz
/pytest-*.tar.gz
/pytest-*/
/results_*/
*.rpm

1
.pytest.metadata Normal file
View File

@ -0,0 +1 @@
6b2e5766b509e9351c457f3d48c665a8e6842e87 SOURCES/pytest-4.6.6.tar.gz

View File

@ -1,53 +0,0 @@
From fbba504cd5e1a74d528a41a11a7b82297cd7da74 Mon Sep 17 00:00:00 2001
From: Bruno Oliveira <nicoddemus@gmail.com>
Date: Thu, 26 Aug 2021 09:26:51 -0300
Subject: [PATCH 1/2] Allow pluggy >=1.0
Now that pluggy 1.0 has been released, we can allow pluggy 1.0 with new pytest versions.
---
setup.cfg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.cfg b/setup.cfg
index f919a94..5c69005 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -44,7 +44,7 @@ install_requires =
attrs>=19.2.0
iniconfig
packaging
- pluggy>=0.12,<1.0.0a1
+ pluggy>=0.12,<2.0
py>=1.8.2
toml
atomicwrites>=1.0;sys_platform=="win32"
From 109bc2649d8f1573e91f281d1a62e95dee0c2cc5 Mon Sep 17 00:00:00 2001
From: Bruno Oliveira <nicoddemus@gmail.com>
Date: Thu, 26 Aug 2021 09:33:50 -0300
Subject: [PATCH 2/2] Adapt docs references to use pluggy 1.0
Also use the intersphinx reference instead of the class directly.
---
doc/en/reference/reference.rst | 5 +----
doc/en/requirements.txt | 1 +
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/doc/en/reference.rst b/doc/en/reference.rst
index 8aa95ca..346c4fa 100644
--- a/doc/en/reference.rst
+++ b/doc/en/reference.rst
@@ -920,11 +920,7 @@ TestReport
_Result
~~~~~~~
-Result used within :ref:`hook wrappers <hookwrapper>`.
-
-.. autoclass:: pluggy.callers._Result
-.. automethod:: pluggy.callers._Result.get_result
-.. automethod:: pluggy.callers._Result.force_result
+Result object used within :ref:`hook wrappers <hookwrapper>`, see :py:class:`_Result in the pluggy documentation <pluggy._callers._Result>` for more information.
Global Variables
----------------

View File

@ -0,0 +1,69 @@
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,100 +1,93 @@
Name: pytest Name: pytest
Version: 6.2.2 Version: 4.6.6
Release: 7%{?dist} Release: 3%{?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}
Patch0: Disable-test-with-hypothesis-when-it-s-not-available.patch
# Allow pluggy >=1.0 # The test in this specfile use pytest-timeout
# Merged upstream, https://github.com/pytest-dev/pytest/pull/9040
# Rebased slightly
Patch: 9040.patch
# 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.
# Disable tests on RHEL9 as to not pull in the test dependencies
# Specify --with tests to run the tests e.g. on EPEL
%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 # When building pytest for the first time with new Python version
# that is not possible as it depends on pytest # that is not possible as it depends on pytest
# The bcond is ignored when tests are disabled %bcond_with timeout
%bcond_without timeout
# Disable documentation on RHEL9 as to not pull in the docs dependencies # When building pytest for the first time with new Python version
# Specify --with docs to generate the documentation e.g. on EPEL # 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
# When building pytest for the first time with new Python version
# we also don't have sphinx yet and cannot build docs.
%bcond_with docs %bcond_with docs
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_scm
# 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: python3-attrs
BuildRequires: python3-iniconfig
BuildRequires: python3-packaging
BuildRequires: python3-pluggy >= 0.12
BuildRequires: python3-py >= 1.5.0
BuildRequires: python3-toml
%if %{with tests}
BuildRequires: python3-hypothesis
BuildRequires: python3-xmlschema
%if %{with optional_tests}
BuildRequires: python3-argcomplete
#BuildRequires: python3-asynctest -- not packaged in Fedora
BuildRequires: python3-decorator
BuildRequires: python3-jinja2
BuildRequires: python3-mock
BuildRequires: python3-nose
BuildRequires: python3-numpy
BuildRequires: python3-pexpect
BuildRequires: python3-pytest-xdist
BuildRequires: python3-twisted
BuildRequires: /usr/bin/lsof
%endif
%if %{with timeout}
BuildRequires: python3-pytest-timeout
%endif
%endif
%if %{with docs} %if %{with docs}
BuildRequires: %{_bindir}/rst2html BuildRequires: %{_bindir}/rst2html
BuildRequires: python3-pygments-pytest BuildRequires: python%{python3_pkgversion}-pygments-pytest
BuildRequires: python3-Pallets-Sphinx-Themes BuildRequires: python%{python3_pkgversion}-sphinx
BuildRequires: python3-sphinx BuildRequires: python%{python3_pkgversion}-sphinx-removed-in
BuildRequires: python3-sphinx-removed-in BuildRequires: python%{python3_pkgversion}-sphinxcontrib-trio
BuildRequires: python3-sphinxcontrib-trio
BuildRequires: make BuildRequires: make
%endif %endif
BuildArch: noarch BuildArch: noarch
# Exclude i686 arch. Due to a modularity issue it's being added to the
# x86_64 compose of CRB, but we don't want to ship it at all.
# See: https://projects.engineering.redhat.com/browse/RCM-72605
ExcludeArch: i686
%description %description
The pytest framework makes it easy to write small tests, yet scales to support py.test provides simple, yet powerful testing for Python.
complex functional testing for applications and libraries.
%package -n python3-%{name} %package -n python%{python3_pkgversion}-%{name}
Summary: Simple powerful testing with Python Summary: Simple powerful testing with Python
Provides: pytest = %{version}-%{release} 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
%description -n python3-%{name} %if %{with timeout}
The pytest framework makes it easy to write small tests, yet scales to support BuildRequires: python%{python3_pkgversion}-pytest-timeout
complex functional testing for applications and libraries. %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
%description -n python%{python3_pkgversion}-%{name}
py.test provides simple, yet powerful testing for Python.
%prep %prep
%autosetup -p1 -n %{name}-%{version} %autosetup -p1
# Remove dependency of setuptools-scm
sed -i "/ *use_scm_version=.*,/d" setup.py
sed -i "s/ *setup_requires=.*/version='%{version}',/" setup.py
%build %build
%py3_build %py3_build
@ -111,13 +104,7 @@ done
%install %install
%py3_install %py3_install
mv %{buildroot}%{_bindir}/pytest %{buildroot}%{_bindir}/pytest-%{python3_version} mv %{buildroot}%{_bindir}/pytest %{buildroot}%{_bindir}/pytest-%{python3_version}
ln -snf pytest-%{python3_version} %{buildroot}%{_bindir}/pytest-3
mv %{buildroot}%{_bindir}/py.test %{buildroot}%{_bindir}/py.test-%{python3_version} mv %{buildroot}%{_bindir}/py.test %{buildroot}%{_bindir}/py.test-%{python3_version}
ln -snf py.test-%{python3_version} %{buildroot}%{_bindir}/py.test-3
# We use 3.X per default
ln -snf pytest-%{python3_version} %{buildroot}%{_bindir}/pytest
ln -snf py.test-%{python3_version} %{buildroot}%{_bindir}/py.test
%if %{with docs} %if %{with docs}
mkdir -p _htmldocs/html mkdir -p _htmldocs/html
@ -133,18 +120,16 @@ find %{buildroot}%{python3_sitelib} \
-name '*.py' \ -name '*.py' \
-exec sed -i -e '1{/^#!/d}' {} \; -exec sed -i -e '1{/^#!/d}' {} \;
%if %{with tests}
%check %check
# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1914843 PYTHONDONTWRITEBYTECODE=1 \
# upstream: https://github.com/pytest-dev/pytest/issues/8256 PATH=%{buildroot}%{_bindir}:${PATH} \
echo "set enable-bracketed-paste off" > .inputrc PYTHONPATH=%{buildroot}%{python3_sitelib} \
export INPUTRC=$PWD/.inputrc %{buildroot}%{_bindir}/pytest-%{python3_version} -r s testing \
%if %{with timeout}
--timeout=30
%endif
%global __pytest %{buildroot}%{_bindir}/pytest %files -n python%{python3_pkgversion}-%{name}
%pytest testing %{?with_timeout:--timeout=30} -rs
%endif
%files -n python3-%{name}
%if %{with docs} %if %{with docs}
%doc CHANGELOG.html %doc CHANGELOG.html
%doc README.html %doc README.html
@ -152,90 +137,19 @@ export INPUTRC=$PWD/.inputrc
%doc _htmldocs/html %doc _htmldocs/html
%endif %endif
%license LICENSE %license LICENSE
%{_bindir}/pytest
%{_bindir}/pytest-3
%{_bindir}/pytest-%{python3_version} %{_bindir}/pytest-%{python3_version}
%{_bindir}/py.test
%{_bindir}/py.test-3
%{_bindir}/py.test-%{python3_version} %{_bindir}/py.test-%{python3_version}
%{python3_sitelib}/pytest-*.egg-info/ %{python3_sitelib}/pytest-*.egg-info/
%{python3_sitelib}/_pytest/ %{python3_sitelib}/_pytest/
%{python3_sitelib}/pytest/ %{python3_sitelib}/pytest.py
%{python3_sitelib}/__pycache__/pytest.*
%changelog %changelog
* Tue Mar 19 2024 Lumír Balhar <lbalhar@redhat.com> - 6.2.2-7 * Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 4.6.6-3
- Allow pluggy >=1.0 - Exclude unsupported i686 arch
Resolves: RHEL-29656
* Tue Feb 22 2022 Tomas Orsava <torsava@redhat.com> - 6.2.2-6 * Tue Nov 19 2019 Lumír Balhar <lbalhar@redhat.com> - 4.6.6-2
- Add gating configuration and a simple smoke test - Adjusted for Python 3.8 module in RHEL 8
- Related: rhbz#1950291
* Tue Feb 08 2022 Tomas Orsava <torsava@redhat.com> - 6.2.2-5
- Add automatically generated Obsoletes tag with the python39- prefix
for smoother upgrade from RHEL8
- Related: rhbz#1990421
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 6.2.2-4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 6.2.2-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Mar 10 2021 Charalampos Stratakis <cstratak@redhat.com> - 6.2.2-2
- Disable tests and documentation generation on RHEL9 to avoid pulling in dependencies
- Drop redundant build dependency on wcwidth (unused since 6.0.0rc1)
* Wed Jan 27 2021 Miro Hrončok <mhroncok@redhat.com> - 6.2.2-1
- Update to 6.2.2
- Update the description
- Fixes: rhbz#1882935
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jan 20 2021 Miro Hrončok <mhroncok@redhat.com> - 6.0.2-2
- Workaround the bracketed-paste mode breaking tests with Bash 5.1+
* 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 * Fri Oct 25 2019 Thomas Moschny <thomas.moschny@gmx.de> - 4.6.6-1
- Update to 4.6.6. - Update to 4.6.6.

View File

@ -1,6 +0,0 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1,11 +0,0 @@
discover:
- name: Smoke-tests
how: shell
tests:
- name: python-import-test
test: python3 -c 'import pytest'
require:
- python3-pytest
duration: 1m
execute:
how: tmt

View File

@ -1 +0,0 @@
SHA512 (pytest-6.2.2.tar.gz) = a81def83759c550c169b3db8ed43b4df40433a88acb663e2e9422ef562149ed52041724b7f3cc5d0d6b532f2243a8d9a9614ffbcd87ed571f7fdde7f036c2297