Hello community,
here is the log from the commit of package python-pytest-forked for
openSUSE:Factory checked in at 2020-06-30 21:54:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-forked (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-forked.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-forked"
Tue Jun 30 21:54:07 2020 rev:5 rq:817666 version:1.2.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-forked/python-pytest-forked.changes
2020-05-28 09:05:28.535367329 +0200
+++
/work/SRC/openSUSE:Factory/.python-pytest-forked.new.3060/python-pytest-forked.changes
2020-06-30 21:54:10.306333060 +0200
@@ -1,0 +2,9 @@
+Mon Jun 29 09:51:58 UTC 2020 - Marketa Calabkova <[email protected]>
+
+- Update to 1.2.0
+ * Add limited support for xfail marker (issue #33 / PR #34).
+ * Fix support for pytest 5.4.0+ (issue #30 / PR #32).
+ * Drop support for Python 3.4 as it is EOL (PR #39).
+- Drop patch pytest5-compat.patch
+
+-------------------------------------------------------------------
Old:
----
pytest-forked-1.1.3.tar.gz
pytest5-compat.patch
New:
----
pytest-forked-1.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-forked.spec ++++++
--- /var/tmp/diff_new_pack.cx3h8o/_old 2020-06-30 21:54:11.050335362 +0200
+++ /var/tmp/diff_new_pack.cx3h8o/_new 2020-06-30 21:54:11.054335374 +0200
@@ -18,15 +18,12 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-forked
-Version: 1.1.3
+Version: 1.2.0
Release: 0
Summary: Run each test in a forked subprocess
License: MIT
URL: https://github.com/pytest-dev/pytest-forked
Source:
https://files.pythonhosted.org/packages/source/p/pytest-forked/pytest-forked-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM pytest5-compat.patch gh#pytest-dev/pytest-forked#30
[email protected]
-# makes the test suite compatible with pytest5.4.0+
-Patch0: pytest5-compat.patch
BuildRequires: %{python_module pytest >= 3.1.0}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
@@ -41,7 +38,6 @@
%prep
%setup -q -n pytest-forked-%{version}
-%autopatch -p1
%build
%python_build
++++++ pytest-forked-1.1.3.tar.gz -> pytest-forked-1.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-forked-1.1.3/.travis.yml
new/pytest-forked-1.2.0/.travis.yml
--- old/pytest-forked-1.1.3/.travis.yml 2019-10-22 18:12:49.000000000 +0200
+++ new/pytest-forked-1.2.0/.travis.yml 2020-06-25 15:22:49.000000000 +0200
@@ -1,25 +1,35 @@
-sudo: false
language: python
python:
+- '3.8'
- '2.7'
-- '3.5'
-- '3.6'
- '3.7'
+- '3.6'
+- '3.5'
cache: pip
install: pip install -U tox setuptools_scm
env:
matrix:
- - TOXENV=py-pytest31
- - TOXENV=py-pytest40
+ - TOXENV=py-pytest310
+ - TOXENV=py-pytest46
+ - TOXENV=py-pytest54
- TOXENV=py-pytestlatest
matrix:
+ exclude:
+ - python: '2.7' # pytest 5+ does not support Python 2
+ env: TOXENV=py-pytest54
include:
- - python: '3.7'
+ - python: '3.8'
env: TOXENV=flakes
- - python: '3.7'
- env: TOXENV=readme
+ - stage: Release
+ name: Build and verify dists (and publish if tagged)
+ python: '3.8'
+ env:
+ TOXENV: build-dists,metadata-validation
# piggyback on existing build for releases
+ before_deploy:
+ # make setup.py no-op because tox has already produced verified dists:
+ - echo > setup.py
deploy:
provider: pypi
user: nicoddemus
@@ -28,7 +38,8 @@
on:
tags: true
repo: pytest-dev/pytest-forked
- distributions: sdist bdist_wheel
+ # keep the dists generated by tox:
+ skip-cleanup: true
script: tox
notifications:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-forked-1.1.3/CHANGELOG
new/pytest-forked-1.2.0/CHANGELOG
--- old/pytest-forked-1.1.3/CHANGELOG 2019-10-22 18:12:49.000000000 +0200
+++ new/pytest-forked-1.2.0/CHANGELOG 2020-06-25 15:22:49.000000000 +0200
@@ -1,3 +1,10 @@
+v1.2.0
+======
+
+* Add limited support for xfail marker (issue #33 / PR #34).
+* Fix support for pytest 5.4.0+ (issue #30 / PR #32).
+* Drop support for Python 3.4 as it is EOL (PR #39).
+
v1.1.3
======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-forked-1.1.3/PKG-INFO
new/pytest-forked-1.2.0/PKG-INFO
--- old/pytest-forked-1.1.3/PKG-INFO 2019-10-22 18:13:20.000000000 +0200
+++ new/pytest-forked-1.2.0/PKG-INFO 2020-06-25 15:23:03.041469000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.2
+Metadata-Version: 2.1
Name: pytest-forked
-Version: 1.1.3
+Version: 1.2.0
Summary: run tests in isolated forked subprocesses
Home-page: https://github.com/pytest-dev/pytest-forked
Author: pytest-dev
@@ -83,8 +83,9 @@
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
-Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+Classifier: Programming Language :: Python :: 3.8
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
+Description-Content-Type: text/x-rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-forked-1.1.3/appveyor.yml
new/pytest-forked-1.2.0/appveyor.yml
--- old/pytest-forked-1.1.3/appveyor.yml 2019-10-22 18:12:49.000000000
+0200
+++ new/pytest-forked-1.2.0/appveyor.yml 1970-01-01 01:00:00.000000000
+0100
@@ -1,7 +0,0 @@
-install:
- - C:\Python35\python -m pip install tox setuptools_scm
-
-build: false # Not a C# project, build stuff at the test step instead.
-
-test_script:
- - C:\Python35\python -m tox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-forked-1.1.3/setup.py
new/pytest-forked-1.2.0/setup.py
--- old/pytest-forked-1.1.3/setup.py 2019-10-22 18:12:49.000000000 +0200
+++ new/pytest-forked-1.2.0/setup.py 2020-06-25 15:22:49.000000000 +0200
@@ -5,6 +5,7 @@
use_scm_version=True,
description='run tests in isolated forked subprocesses',
long_description=open('README.rst').read(),
+ long_description_content_type='text/x-rst',
license='MIT',
author='pytest-dev',
author_email='[email protected]',
@@ -20,7 +21,7 @@
zip_safe=False,
install_requires=['pytest>=3.1.0'],
setup_requires=['setuptools_scm'],
- python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
+ python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
classifiers=[
'Development Status :: 7 - Inactive',
'Framework :: Pytest',
@@ -35,9 +36,9 @@
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
],
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-forked-1.1.3/src/pytest_forked/__init__.py
new/pytest-forked-1.2.0/src/pytest_forked/__init__.py
--- old/pytest-forked-1.1.3/src/pytest_forked/__init__.py 2019-10-22
18:12:49.000000000 +0200
+++ new/pytest-forked-1.2.0/src/pytest_forked/__init__.py 2020-06-25
15:22:49.000000000 +0200
@@ -1,4 +1,6 @@
import os
+import warnings
+
import py
# we know this bit is bad, but we cant help it with the current pytest setup
from _pytest import runner
@@ -71,13 +73,8 @@
def report_process_crash(item, result):
- try:
- from _pytest.compat import getfslineno
- except ImportError:
- # pytest<4.2
- path, lineno = item._getfslineno()
- else:
- path, lineno = getfslineno(item)
+ from _pytest._code.source import getfslineno
+ path, lineno = getfslineno(item)
info = ("%s:%s: running the test CRASHED with signal %d" %
(path, lineno, result.signal))
from _pytest import runner
@@ -93,4 +90,24 @@
rep.sections.append(("captured stdout", result.out))
if result.err:
rep.sections.append(("captured stderr", result.err))
+
+ xfail_marker = item.get_closest_marker('xfail')
+ if not xfail_marker:
+ return rep
+
+ rep.outcome = "skipped"
+ rep.wasxfail = (
+ "reason: {xfail_reason}; "
+ "pytest-forked reason: {crash_info}".
+ format(
+ xfail_reason=xfail_marker.kwargs['reason'],
+ crash_info=info,
+ )
+ )
+ warnings.warn(
+ 'pytest-forked xfail support is incomplete at the moment and may '
+ 'output a misleading reason message',
+ RuntimeWarning,
+ )
+
return rep
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-forked-1.1.3/src/pytest_forked.egg-info/PKG-INFO
new/pytest-forked-1.2.0/src/pytest_forked.egg-info/PKG-INFO
--- old/pytest-forked-1.1.3/src/pytest_forked.egg-info/PKG-INFO 2019-10-22
18:13:20.000000000 +0200
+++ new/pytest-forked-1.2.0/src/pytest_forked.egg-info/PKG-INFO 2020-06-25
15:23:03.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.2
+Metadata-Version: 2.1
Name: pytest-forked
-Version: 1.1.3
+Version: 1.2.0
Summary: run tests in isolated forked subprocesses
Home-page: https://github.com/pytest-dev/pytest-forked
Author: pytest-dev
@@ -83,8 +83,9 @@
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
-Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+Classifier: Programming Language :: Python :: 3.8
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
+Description-Content-Type: text/x-rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-forked-1.1.3/src/pytest_forked.egg-info/SOURCES.txt
new/pytest-forked-1.2.0/src/pytest_forked.egg-info/SOURCES.txt
--- old/pytest-forked-1.1.3/src/pytest_forked.egg-info/SOURCES.txt
2019-10-22 18:13:20.000000000 +0200
+++ new/pytest-forked-1.2.0/src/pytest_forked.egg-info/SOURCES.txt
2020-06-25 15:23:03.000000000 +0200
@@ -4,7 +4,6 @@
LICENSE
MANIFEST.in
README.rst
-appveyor.yml
pyproject.toml
setup.cfg
setup.py
@@ -19,4 +18,5 @@
src/pytest_forked.egg-info/requires.txt
src/pytest_forked.egg-info/top_level.txt
testing/conftest.py
-testing/test_boxed.py
\ No newline at end of file
+testing/test_boxed.py
+testing/test_xfail_behavior.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-forked-1.1.3/testing/test_xfail_behavior.py
new/pytest-forked-1.2.0/testing/test_xfail_behavior.py
--- old/pytest-forked-1.1.3/testing/test_xfail_behavior.py 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-forked-1.2.0/testing/test_xfail_behavior.py 2020-06-25
15:22:49.000000000 +0200
@@ -0,0 +1,131 @@
+# -*- coding: utf-8 -*-
+"""Tests for xfail support."""
+import os
+import signal
+
+import pytest
+
+IS_PYTEST4_PLUS = int(pytest.__version__[0]) >= 4 # noqa: WPS609
+FAILED_WORD = 'FAILED' if IS_PYTEST4_PLUS else 'FAIL'
+
+pytestmark = pytest.mark.skipif( # pylint: disable=invalid-name
+ not hasattr(os, 'fork'), # noqa: WPS421
+ reason='os.fork required',
+)
+
+
[email protected](
+ ('is_crashing', 'is_strict'),
+ (
+ pytest.param(True, True, id='strict xfail'),
+ pytest.param(False, True, id='strict xpass'),
+ pytest.param(True, False, id='non-strict xfail'),
+ pytest.param(False, False, id='non-strict xpass'),
+ ),
+)
+def test_xfail(is_crashing, is_strict, testdir):
+ """Test xfail/xpass/strict permutations."""
+ # pylint: disable=possibly-unused-variable
+ sig_num = signal.SIGTERM.numerator
+
+ test_func_body = (
+ 'os.kill(os.getpid(), signal.SIGTERM)'
+ if is_crashing
+ else 'assert True'
+ )
+
+ if is_crashing:
+ # marked xfailed and crashing, no matter strict or not
+ expected_letter = 'x' # XFAILED
+ expected_lowercase = 'xfailed'
+ expected_word = 'XFAIL'
+ elif is_strict:
+ # strict and not failing as expected should cause failure
+ expected_letter = 'F' # FAILED
+ expected_lowercase = 'failed'
+ expected_word = FAILED_WORD
+ elif not is_strict:
+ # non-strict and not failing as expected should cause xpass
+ expected_letter = 'X' # XPASS
+ expected_lowercase = 'xpassed'
+ expected_word = 'XPASS'
+
+ session_start_title = '*==== test session starts ====*'
+ loaded_pytest_plugins = 'plugins: forked*'
+ collected_tests_num = 'collected 1 item'
+ expected_progress = 'test_xfail.py {expected_letter!s}'.format(**locals())
+ failures_title = '*==== FAILURES ====*'
+ failures_test_name = '*____ test_function ____*'
+ failures_test_reason = '[XPASS(strict)] The process gets terminated'
+ short_test_summary_title = '*==== short test summary info ====*'
+ short_test_summary = (
+ '{expected_word!s} test_xfail.py::test_function'.
+ format(**locals())
+ )
+ if expected_lowercase == 'xpassed':
+ # XPASS wouldn't have the crash message from
+ # pytest-forked because the crash doesn't happen
+ short_test_summary = ' '.join((
+ short_test_summary, 'The process gets terminated',
+ ))
+ reason_string = (
+ ' reason: The process gets terminated; '
+ 'pytest-forked reason: '
+ '*:*: running the test CRASHED with signal {sig_num:d}'.
+ format(**locals())
+ )
+ total_summary_line = (
+ '*==== 1 {expected_lowercase!s} in 0.*s* ====*'.
+ format(**locals())
+ )
+
+ expected_lines = (
+ session_start_title,
+ loaded_pytest_plugins,
+ collected_tests_num,
+ expected_progress,
+ )
+ if expected_word == FAILED_WORD:
+ # XPASS(strict)
+ expected_lines += (
+ failures_title,
+ failures_test_name,
+ failures_test_reason,
+ )
+ expected_lines += (
+ short_test_summary_title,
+ short_test_summary,
+ )
+ if expected_lowercase == 'xpassed' and expected_word == FAILED_WORD:
+ # XPASS(strict)
+ expected_lines += (
+ reason_string,
+ )
+ expected_lines += (
+ total_summary_line,
+ )
+
+ test_module = testdir.makepyfile(
+ """
+ import os
+ import signal
+
+ import pytest
+
+ @pytest.mark.xfail(
+ reason='The process gets terminated',
+ strict={is_strict!s},
+ )
+ @pytest.mark.forked
+ def test_function():
+ {test_func_body!s}
+ """.
+ format(**locals())
+ )
+
+ pytest_run_result = testdir.runpytest(
+ test_module,
+ '-ra',
+ '-p', 'no:warnings', # the current implementation emits RuntimeWarning
+ )
+ pytest_run_result.stdout.fnmatch_lines(expected_lines)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-forked-1.1.3/tox.ini
new/pytest-forked-1.2.0/tox.ini
--- old/pytest-forked-1.1.3/tox.ini 2019-10-22 18:12:49.000000000 +0200
+++ new/pytest-forked-1.2.0/tox.ini 2020-06-25 15:22:49.000000000 +0200
@@ -3,17 +3,19 @@
minversion = 3.7.0
isolated_build = true
envlist=
- py{27,35,36}-pytest{31,40,latest}
+ py{27,35,36,37,38}-pytest{310,46,54,latest}
flakes
- readme
+ build-dists
+ metadata-validation
[testenv]
deps =
pycmd
# to avoid .eggs
setuptools_scm
- pytest31: pytest~=3.1
- pytest40: pytest~=4.0
+ pytest310: pytest~=3.10
+ pytest46: pytest~=4.6
+ pytest54: pytest~=5.4
pytestlatest: pytest
platform=linux|darwin
commands=
@@ -22,13 +24,38 @@
[testenv:flakes]
changedir=
deps = flake8
-commands = flake8 setup.py testing xdist
+commands = flake8 setup.py testing src/pytest_forked/
-[testenv:readme]
-changedir =
-deps = readme
+[testenv:build-dists]
+basepython = python3
+isolated_build = true
+# `usedevelop = true` overrides `skip_install` instruction, it's unwanted
+usedevelop = false
+# don't install pytest-forked itself in this env
+skip_install = true
+deps =
+ pep517 >= 0.7.0
+commands =
+ rm -rfv {toxinidir}/dist/
+ {envpython} -m pep517.build \
+ --source \
+ --binary \
+ --out-dir {toxinidir}/dist/ \
+ {toxinidir}
+whitelist_externals =
+ rm
+
+[testenv:metadata-validation]
+description =
+ Verify that dists under the dist/ dir have valid metadata
+depends =
+ build-dists
+deps =
+ twine
+usedevelop = false
skip_install = true
-commands = python setup.py check -r -s
+commands =
+ twine check {toxinidir}/dist/*
[pytest]
addopts = -rsfxX