Skip to content

1.3.0: tox warnings and pytest is failing with flaky and relaxed extensions #52

@kloczek

Description

@kloczek

Somerimes it is good to reprt even some minir warnings :)

+ cd pytest-forked-1.3.0
+ /usr/bin/python3 -Bm tox --skip-missing-interpreters
.package create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/.package
.package installdeps: setuptools ~= 41.4, setuptools_scm ~= 3.3, wheel ~= 0.33.6
py27-pytest310 create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py27-pytest310
SKIPPED: InterpreterNotFound: python2.7
py27-pytest46 create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py27-pytest46
SKIPPED: InterpreterNotFound: python2.7
py27-pytest54 create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py27-pytest54
SKIPPED: InterpreterNotFound: python2.7
py27-pytestlatest create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py27-pytestlatest
SKIPPED: InterpreterNotFound: python2.7
py35-pytest310 create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py35-pytest310
SKIPPED: InterpreterNotFound: python3.5
py35-pytest46 create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py35-pytest46
SKIPPED: InterpreterNotFound: python3.5
py35-pytest54 create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py35-pytest54
SKIPPED: InterpreterNotFound: python3.5
py35-pytestlatest create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py35-pytestlatest
SKIPPED: InterpreterNotFound: python3.5
py36-pytest310 create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py36-pytest310
SKIPPED: InterpreterNotFound: python3.6
py36-pytest46 create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py36-pytest46
SKIPPED: InterpreterNotFound: python3.6
py36-pytest54 create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py36-pytest54
SKIPPED: InterpreterNotFound: python3.6
py36-pytestlatest create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py36-pytestlatest
SKIPPED: InterpreterNotFound: python3.6
py37-pytest310 create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py37-pytest310
SKIPPED: InterpreterNotFound: python3.7
py37-pytest46 create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py37-pytest46
SKIPPED: InterpreterNotFound: python3.7
py37-pytest54 create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py37-pytest54
SKIPPED: InterpreterNotFound: python3.7
py37-pytestlatest create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py37-pytestlatest
SKIPPED: InterpreterNotFound: python3.7
py38-pytest310 create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py38-pytest310
py38-pytest310 installdeps: pycmd, setuptools_scm, pytest~=3.10
py38-pytest310 inst: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/.tmp/package/1/pytest-forked-1.3.0.tar.gz
py38-pytest310 installed: atomicwrites==1.4.0,attrs==20.3.0,more-itertools==8.7.0,pluggy==0.13.1,py==1.10.0,pycmd==1.2,pytest==3.10.1,pytest-forked==1.3.0,setuptools-scm==6.0.1,six==1.15.0
py38-pytest310 run-test-pre: PYTHONHASHSEED='951081011'
py38-pytest310 run-test: commands[0] | pytest
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-3.10.1, py-1.10.0, pluggy-0.13.1
rootdir: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0, inifile: tox.ini
plugins: forked-1.3.0
collected 10 items

testing/test_boxed.py ...xx.                                                                                                                                         [ 60%]
testing/test_xfail_behavior.py ....                                                                                                                                  [100%]
========================================================================= short test summary info ==========================================================================
XFAIL testing/test_boxed.py::test_functional_boxed_capturing[sys]
  capture cleanup needed
XFAIL testing/test_boxed.py::test_functional_boxed_capturing[fd]
  capture cleanup needed

=================================================================== 8 passed, 2 xfailed in 0.62 seconds ====================================================================
py38-pytest46 create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py38-pytest46
py38-pytest46 installdeps: pycmd, setuptools_scm, pytest~=4.6
py38-pytest46 inst: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/.tmp/package/1/pytest-forked-1.3.0.tar.gz
py38-pytest46 installed: atomicwrites==1.4.0,attrs==20.3.0,more-itertools==8.7.0,packaging==20.9,pluggy==0.13.1,py==1.10.0,pycmd==1.2,pyparsing==2.4.7,pytest==4.6.11,pytest-forked==1.3.0,setuptools-scm==6.0.1,six==1.15.0,wcwidth==0.2.5
py38-pytest46 run-test-pre: PYTHONHASHSEED='951081011'
py38-pytest46 run-test: commands[0] | pytest
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-4.6.11, py-1.10.0, pluggy-0.13.1
cachedir: .tox/py38-pytest46/.pytest_cache
rootdir: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0, inifile: tox.ini
plugins: forked-1.3.0
collected 10 items

testing/test_boxed.py ...xx.                                                                                                                                         [ 60%]
testing/test_xfail_behavior.py ....                                                                                                                                  [100%]

========================================================================= short test summary info ==========================================================================
XFAIL testing/test_boxed.py::test_functional_boxed_capturing[sys]
  capture cleanup needed
XFAIL testing/test_boxed.py::test_functional_boxed_capturing[fd]
  capture cleanup needed
=================================================================== 8 passed, 2 xfailed in 0.70 seconds ====================================================================
py38-pytest54 create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py38-pytest54
py38-pytest54 installdeps: pycmd, setuptools_scm, pytest~=5.4
py38-pytest54 inst: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/.tmp/package/1/pytest-forked-1.3.0.tar.gz
py38-pytest54 installed: attrs==20.3.0,more-itertools==8.7.0,packaging==20.9,pluggy==0.13.1,py==1.10.0,pycmd==1.2,pyparsing==2.4.7,pytest==5.4.3,pytest-forked==1.3.0,setuptools-scm==6.0.1,wcwidth==0.2.5
py38-pytest54 run-test-pre: PYTHONHASHSEED='951081011'
py38-pytest54 run-test: commands[0] | pytest
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-5.4.3, py-1.10.0, pluggy-0.13.1
cachedir: .tox/py38-pytest54/.pytest_cache
rootdir: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0, inifile: tox.ini
plugins: forked-1.3.0
collected 10 items

testing/test_boxed.py ...xx.                                                                                                                                         [ 60%]
testing/test_xfail_behavior.py ....                                                                                                                                  [100%]

============================================================================= warnings summary =============================================================================
testing/test_boxed.py::test_functional_boxed
testing/test_boxed.py::test_functional_boxed_per_test
testing/test_boxed.py::test_functional_boxed_capturing[no]
testing/test_boxed.py::test_functional_boxed_capturing[sys]
testing/test_boxed.py::test_functional_boxed_capturing[fd]
testing/test_xfail_behavior.py::test_xfail[strict xfail]
testing/test_xfail_behavior.py::test_xfail[strict xpass]
testing/test_xfail_behavior.py::test_xfail[non-strict xfail]
testing/test_xfail_behavior.py::test_xfail[non-strict xpass]
  /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py38-pytest54/lib/python3.8/site-packages/_pytest/compat.py:333: PytestDeprecationWarning: The TerminalReporter.writer attribute is deprecated, use TerminalReporter._tw instead at your own risk.
  See https://docs.pytest.org/en/latest/deprecations.html#terminalreporter-writer for more information.
    return getattr(object, name, default)

-- Docs: https://docs.pytest.org/en/latest/warnings.html
========================================================================= short test summary info ==========================================================================
XFAIL testing/test_boxed.py::test_functional_boxed_capturing[sys]
  capture cleanup needed
XFAIL testing/test_boxed.py::test_functional_boxed_capturing[fd]
  capture cleanup needed
================================================================= 8 passed, 2 xfailed, 9 warnings in 0.76s =================================================================
py38-pytestlatest create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/py38-pytestlatest
py38-pytestlatest installdeps: pycmd, setuptools_scm, pytest
py38-pytestlatest inst: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/.tmp/package/1/pytest-forked-1.3.0.tar.gz
py38-pytestlatest installed: attrs==20.3.0,iniconfig==1.1.1,packaging==20.9,pluggy==0.13.1,py==1.10.0,pycmd==1.2,pyparsing==2.4.7,pytest==6.2.3,pytest-forked==1.3.0,setuptools-scm==6.0.1,toml==0.10.2
py38-pytestlatest run-test-pre: PYTHONHASHSEED='951081011'
py38-pytestlatest run-test: commands[0] | pytest
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-6.2.3, py-1.10.0, pluggy-0.13.1
cachedir: .tox/py38-pytestlatest/.pytest_cache
rootdir: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0, configfile: tox.ini
plugins: forked-1.3.0
collected 10 items

testing/test_boxed.py ...xx.                                                                                                                                         [ 60%]
testing/test_xfail_behavior.py ....                                                                                                                                  [100%]

========================================================================= short test summary info ==========================================================================
XFAIL testing/test_boxed.py::test_functional_boxed_capturing[sys]
  capture cleanup needed
XFAIL testing/test_boxed.py::test_functional_boxed_capturing[fd]
  capture cleanup needed
======================================================================= 8 passed, 2 xfailed in 0.65s =======================================================================
flakes create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/flakes
flakes installdeps: flake8
flakes inst: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/.tmp/package/1/pytest-forked-1.3.0.tar.gz
flakes installed: attrs==20.3.0,flake8==3.9.1,iniconfig==1.1.1,mccabe==0.6.1,packaging==20.9,pluggy==0.13.1,py==1.10.0,pycodestyle==2.7.0,pyflakes==2.3.1,pyparsing==2.4.7,pytest==6.2.3,pytest-forked==1.3.0,toml==0.10.2
flakes run-test-pre: PYTHONHASHSEED='951081011'
flakes run-test: commands[0] | flake8 setup.py testing src/pytest_forked/
build-dists create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/build-dists
build-dists installdeps: pep517 >= 0.7.0
build-dists installed: pep517==0.10.0,toml==0.10.2
build-dists run-test-pre: PYTHONHASHSEED='951081011'
build-dists run-test: commands[0] | rm -rfv /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/dist/
build-dists run-test: commands[1] | /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/build-dists/bin/python -m pep517.build --source --binary --out-dir /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/dist/ /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0
pep517.build is deprecated. Consider switching to https://pypi.org/project/build/
WARNING: You are using pip version 19.3.1; however, version 21.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
WARNING: You are using pip version 19.3.1; however, version 21.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
running sdist
running egg_info
writing src/pytest_forked.egg-info/PKG-INFO
writing dependency_links to src/pytest_forked.egg-info/dependency_links.txt
writing entry points to src/pytest_forked.egg-info/entry_points.txt
writing requirements to src/pytest_forked.egg-info/requires.txt
writing top-level names to src/pytest_forked.egg-info/top_level.txt
adding license file 'LICENSE' (matched pattern 'LICEN[CS]E*')
reading manifest file 'src/pytest_forked.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'README.txt'
no previously-included directories found matching '.git'
writing manifest file 'src/pytest_forked.egg-info/SOURCES.txt'
running check
creating pytest-forked-1.3.0
creating pytest-forked-1.3.0/example
creating pytest-forked-1.3.0/src
creating pytest-forked-1.3.0/src/pytest_forked
creating pytest-forked-1.3.0/src/pytest_forked.egg-info
creating pytest-forked-1.3.0/testing
creating pytest-forked-1.3.0/testing/__pycache__
copying files to pytest-forked-1.3.0...
copying .gitignore -> pytest-forked-1.3.0
copying .travis.yml -> pytest-forked-1.3.0
copying CHANGELOG -> pytest-forked-1.3.0
copying LICENSE -> pytest-forked-1.3.0
copying MANIFEST.in -> pytest-forked-1.3.0
copying README.rst -> pytest-forked-1.3.0
copying pyproject.toml -> pytest-forked-1.3.0
copying setup.cfg -> pytest-forked-1.3.0
copying setup.py -> pytest-forked-1.3.0
copying tox.ini -> pytest-forked-1.3.0
copying example/boxed.txt -> pytest-forked-1.3.0/example
copying src/pytest_forked/__init__.py -> pytest-forked-1.3.0/src/pytest_forked
copying src/pytest_forked.egg-info/PKG-INFO -> pytest-forked-1.3.0/src/pytest_forked.egg-info
copying src/pytest_forked.egg-info/SOURCES.txt -> pytest-forked-1.3.0/src/pytest_forked.egg-info
copying src/pytest_forked.egg-info/dependency_links.txt -> pytest-forked-1.3.0/src/pytest_forked.egg-info
copying src/pytest_forked.egg-info/entry_points.txt -> pytest-forked-1.3.0/src/pytest_forked.egg-info
copying src/pytest_forked.egg-info/not-zip-safe -> pytest-forked-1.3.0/src/pytest_forked.egg-info
copying src/pytest_forked.egg-info/requires.txt -> pytest-forked-1.3.0/src/pytest_forked.egg-info
copying src/pytest_forked.egg-info/top_level.txt -> pytest-forked-1.3.0/src/pytest_forked.egg-info
copying testing/conftest.py -> pytest-forked-1.3.0/testing
copying testing/test_boxed.py -> pytest-forked-1.3.0/testing
copying testing/test_xfail_behavior.py -> pytest-forked-1.3.0/testing
copying testing/__pycache__/conftest.cpython-38-PYTEST.pyc -> pytest-forked-1.3.0/testing/__pycache__
copying testing/__pycache__/conftest.cpython-38-pytest-5.4.3.pyc -> pytest-forked-1.3.0/testing/__pycache__
copying testing/__pycache__/conftest.cpython-38-pytest-6.2.3.pyc -> pytest-forked-1.3.0/testing/__pycache__
copying testing/__pycache__/test_boxed.cpython-38-PYTEST.pyc -> pytest-forked-1.3.0/testing/__pycache__
copying testing/__pycache__/test_boxed.cpython-38-pytest-5.4.3.pyc -> pytest-forked-1.3.0/testing/__pycache__
copying testing/__pycache__/test_boxed.cpython-38-pytest-6.2.3.pyc -> pytest-forked-1.3.0/testing/__pycache__
copying testing/__pycache__/test_xfail_behavior.cpython-38-PYTEST.pyc -> pytest-forked-1.3.0/testing/__pycache__
copying testing/__pycache__/test_xfail_behavior.cpython-38-pytest-5.4.3.pyc -> pytest-forked-1.3.0/testing/__pycache__
copying testing/__pycache__/test_xfail_behavior.cpython-38-pytest-6.2.3.pyc -> pytest-forked-1.3.0/testing/__pycache__
Writing pytest-forked-1.3.0/setup.cfg
Creating tar archive
removing 'pytest-forked-1.3.0' (and everything under it)
WARNING: You are using pip version 19.3.1; however, version 21.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
WARNING: You are using pip version 19.3.1; however, version 21.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
running bdist_wheel
running build
running build_py
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/pytest_forked
copying build/lib/pytest_forked/__init__.py -> build/bdist.linux-x86_64/wheel/pytest_forked
running install_egg_info
running egg_info
writing src/pytest_forked.egg-info/PKG-INFO
writing dependency_links to src/pytest_forked.egg-info/dependency_links.txt
writing entry points to src/pytest_forked.egg-info/entry_points.txt
writing requirements to src/pytest_forked.egg-info/requires.txt
writing top-level names to src/pytest_forked.egg-info/top_level.txt
adding license file 'LICENSE' (matched pattern 'LICEN[CS]E*')
reading manifest file 'src/pytest_forked.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'README.txt'
no previously-included directories found matching '.git'
writing manifest file 'src/pytest_forked.egg-info/SOURCES.txt'
Copying src/pytest_forked.egg-info to build/bdist.linux-x86_64/wheel/pytest_forked-1.3.0-py3.8.egg-info
running install_scripts
adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
creating build/bdist.linux-x86_64/wheel/pytest_forked-1.3.0.dist-info/WHEEL
creating '/tmp/tmp_sp8uefq/tmpj3lnod8r/pytest_forked-1.3.0-py2.py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'pytest_forked/__init__.py'
adding 'pytest_forked-1.3.0.dist-info/LICENSE'
adding 'pytest_forked-1.3.0.dist-info/METADATA'
adding 'pytest_forked-1.3.0.dist-info/WHEEL'
adding 'pytest_forked-1.3.0.dist-info/entry_points.txt'
adding 'pytest_forked-1.3.0.dist-info/top_level.txt'
adding 'pytest_forked-1.3.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
metadata-validation create: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/.tox/metadata-validation
metadata-validation installdeps: twine
metadata-validation installed: bleach==3.3.0,certifi==2020.12.5,cffi==1.14.5,chardet==4.0.0,colorama==0.4.4,cryptography==3.4.7,docutils==0.17.1,idna==2.10,importlib-metadata==4.0.1,jeepney==0.6.0,keyring==23.0.1,packaging==20.9,pkginfo==1.7.0,pycparser==2.20,Pygments==2.9.0,pyparsing==2.4.7,readme-renderer==29.0,requests==2.25.1,requests-toolbelt==0.9.1,rfc3986==1.4.0,SecretStorage==3.3.1,six==1.15.0,tqdm==4.60.0,twine==3.4.1,urllib3==1.26.4,webencodings==0.5.1,zipp==3.4.1
metadata-validation run-test-pre: PYTHONHASHSEED='951081011'
metadata-validation run-test: commands[0] | twine check '/home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/dist/*'
Checking /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/dist/pytest_forked-1.3.0-py2.py3-none-any.whl: PASSED
Checking /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/dist/pytest-forked-1.3.0.tar.gz: PASSED
_________________________________________________________________________________ summary __________________________________________________________________________________
SKIPPED:  py27-pytest310: InterpreterNotFound: python2.7
SKIPPED:  py27-pytest46: InterpreterNotFound: python2.7
SKIPPED:  py27-pytest54: InterpreterNotFound: python2.7
SKIPPED:  py27-pytestlatest: InterpreterNotFound: python2.7
SKIPPED:  py35-pytest310: InterpreterNotFound: python3.5
SKIPPED:  py35-pytest46: InterpreterNotFound: python3.5
SKIPPED:  py35-pytest54: InterpreterNotFound: python3.5
SKIPPED:  py35-pytestlatest: InterpreterNotFound: python3.5
SKIPPED:  py36-pytest310: InterpreterNotFound: python3.6
SKIPPED:  py36-pytest46: InterpreterNotFound: python3.6
SKIPPED:  py36-pytest54: InterpreterNotFound: python3.6
SKIPPED:  py36-pytestlatest: InterpreterNotFound: python3.6
SKIPPED:  py37-pytest310: InterpreterNotFound: python3.7
SKIPPED:  py37-pytest46: InterpreterNotFound: python3.7
SKIPPED:  py37-pytest54: InterpreterNotFound: python3.7
SKIPPED:  py37-pytestlatest: InterpreterNotFound: python3.7
  py38-pytest310: commands succeeded
  py38-pytest46: commands succeeded
  py38-pytest54: commands succeeded
  py38-pytestlatest: commands succeeded
  flakes: commands succeeded
  build-dists: commands succeeded
  metadata-validation: commands succeeded
  congratulations :)

Usually on building my own rpm package when I see that tox is used as primary testiing framework I'm trying to use pytast because it has a bit shorter dependencies than tox.
Usulally I'm doing such test in env where I have installed Everything™️😎
I found that pytest is failing:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-forked-1.3.0-3.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-forked-1.3.0-3.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/python3 -Bm pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-6.2.3, py-1.10.0, pluggy-0.13.1
rootdir: /home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0, configfile: tox.ini
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, asyncio-0.14.0, expect-1.1.0, cov-2.11.1, mock-3.5.1, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, flaky-3.7.0, cases-3.4.6, hypothesis-6.10.1, case-1.5.3, isort-1.3.0, aspectlib-1.5.2
collected 10 items

testing/test_boxed.py ..Fxx.                                                                                                                                         [ 60%]
testing/test_xfail_behavior.py .F.F                                                                                                                                  [100%]

================================================================================= FAILURES =================================================================================
___________________________________________________________________ test_functional_boxed_capturing[no] ____________________________________________________________________

testdir = <Testdir local('/tmp/pytest-of-tkloczko/pytest-10/test_functional_boxed_capturing0')>, capmode = 'no'

    @needsfork
    @pytest.mark.parametrize("capmode", [
        "no",
        pytest.param("sys", marks=pytest.mark.xfail(reason="capture cleanup needed")),
        pytest.param("fd", marks=pytest.mark.xfail(reason="capture cleanup needed"))])
    def test_functional_boxed_capturing(testdir, capmode):
        p1 = testdir.makepyfile("""
            import os
            import sys
            def test_function():
                sys.stdout.write("hello\\n")
                sys.stderr.write("world\\n")
                os.kill(os.getpid(), 15)
        """)
        result = testdir.runpytest(p1, "--forked", "--capture=%s" % capmode)
>       result.stdout.fnmatch_lines("""
            *CRASHED*
            *stdout*
            hello
            *stderr*
            world
            *1 failed*
    """)
E       Failed: nomatch: '*CRASHED*'
E           and: '============================= test session starts =============================='
E           and: 'platform linux -- Python 3.8.9, pytest-6.2.3, py-1.10.0, pluggy-0.13.1'
E           and: 'rootdir: /tmp/pytest-of-tkloczko/pytest-10/test_functional_boxed_capturing0'
E           and: 'plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, asyncio-0.14.0, expect-1.1.0, cov-2.11.1, mock-3.5.1, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, flaky-3.7.0, cases-3.4.6, hypothesis-6.10.1, case-1.5.3, isort-1.3.0, aspectlib-1.5.2'
E           and: 'collected 1 item'
E           and: ''
E           and: 'test_functional_boxed_capturing.py F'
E           and: ''
E           and: '=================================== FAILURES ==================================='
E           and: '________________________________ test_function _________________________________'
E       fnmatch: '*CRASHED*'
E          with: ':-1: running the test CRASHED with signal 0'
E       nomatch: '*stdout*'
E           and: '------------------------------- captured stderr --------------------------------'
E           and: '/usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:139: KeyError: <Function test_function>'
E           and: '=========================== short test summary info ============================'
E           and: 'FAILED test_functional_boxed_capturing.py::test_function'
E           and: '============================== 1 failed in 0.07s ==============================='
E       remains unmatched: '*stdout*'

/home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/testing/test_boxed.py:54: Failed
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
============================= test session starts ==============================
platform linux -- Python 3.8.9, pytest-6.2.3, py-1.10.0, pluggy-0.13.1
rootdir: /tmp/pytest-of-tkloczko/pytest-10/test_functional_boxed_capturing0
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, asyncio-0.14.0, expect-1.1.0, cov-2.11.1, mock-3.5.1, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, flaky-3.7.0, cases-3.4.6, hypothesis-6.10.1, case-1.5.3, isort-1.3.0, aspectlib-1.5.2
collected 1 item

test_functional_boxed_capturing.py F

=================================== FAILURES ===================================
________________________________ test_function _________________________________
:-1: running the test CRASHED with signal 0
------------------------------- captured stderr --------------------------------
/usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:139: KeyError: <Function test_function>
=========================== short test summary info ============================
FAILED test_functional_boxed_capturing.py::test_function
============================== 1 failed in 0.07s ===============================
_________________________________________________________________________ test_xfail[strict xpass] _________________________________________________________________________

is_crashing = False, is_strict = True, testdir = <Testdir local('/tmp/pytest-of-tkloczko/pytest-10/test_xfail1')>

    @pytest.mark.parametrize(
        ('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

            # The current implementation emits RuntimeWarning.
            pytestmark = pytest.mark.filterwarnings('ignore:pytest-forked xfail')

            @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')
>       pytest_run_result.stdout.fnmatch_lines(expected_lines)
E       Failed: fnmatch: '*==== test session starts ====*'
E          with: '============================= test session starts =============================='
E       nomatch: 'plugins: forked*'
E           and: 'platform linux -- Python 3.8.9, pytest-6.2.3, py-1.10.0, pluggy-0.13.1'
E           and: 'rootdir: /tmp/pytest-of-tkloczko/pytest-10/test_xfail1'
E       fnmatch: 'plugins: forked*'
E          with: 'plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, asyncio-0.14.0, expect-1.1.0, cov-2.11.1, mock-3.5.1, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, flaky-3.7.0, cases-3.4.6, hypothesis-6.10.1, case-1.5.3, isort-1.3.0, aspectlib-1.5.2'
E       exact match: 'collected 1 item'
E       nomatch: 'test_xfail.py F*'
E           and: ''
E           and: 'test_xfail.py x                                                          [100%]'
E           and: ''
E           and: '=========================== short test summary info ============================'
E           and: 'XFAIL test_xfail.py::test_function'
E           and: '  reason: The process gets terminated; pytest-forked reason: :-1: running the test CRASHED with signal 0'
E           and: '============================== 1 xfailed in 0.06s =============================='
E       remains unmatched: 'test_xfail.py F*'

/home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/testing/test_xfail_behavior.py:130: Failed
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
============================= test session starts ==============================
platform linux -- Python 3.8.9, pytest-6.2.3, py-1.10.0, pluggy-0.13.1
rootdir: /tmp/pytest-of-tkloczko/pytest-10/test_xfail1
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, asyncio-0.14.0, expect-1.1.0, cov-2.11.1, mock-3.5.1, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, flaky-3.7.0, cases-3.4.6, hypothesis-6.10.1, case-1.5.3, isort-1.3.0, aspectlib-1.5.2
collected 1 item

test_xfail.py x                                                          [100%]

=========================== short test summary info ============================
XFAIL test_xfail.py::test_function
  reason: The process gets terminated; pytest-forked reason: :-1: running the test CRASHED with signal 0
============================== 1 xfailed in 0.06s ==============================
_______________________________________________________________________ test_xfail[non-strict xpass] _______________________________________________________________________

is_crashing = False, is_strict = False, testdir = <Testdir local('/tmp/pytest-of-tkloczko/pytest-10/test_xfail3')>

    @pytest.mark.parametrize(
        ('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

            # The current implementation emits RuntimeWarning.
            pytestmark = pytest.mark.filterwarnings('ignore:pytest-forked xfail')

            @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')
>       pytest_run_result.stdout.fnmatch_lines(expected_lines)
E       Failed: fnmatch: '*==== test session starts ====*'
E          with: '============================= test session starts =============================='
E       nomatch: 'plugins: forked*'
E           and: 'platform linux -- Python 3.8.9, pytest-6.2.3, py-1.10.0, pluggy-0.13.1'
E           and: 'rootdir: /tmp/pytest-of-tkloczko/pytest-10/test_xfail3'
E       fnmatch: 'plugins: forked*'
E          with: 'plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, asyncio-0.14.0, expect-1.1.0, cov-2.11.1, mock-3.5.1, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, flaky-3.7.0, cases-3.4.6, hypothesis-6.10.1, case-1.5.3, isort-1.3.0, aspectlib-1.5.2'
E       exact match: 'collected 1 item'
E       nomatch: 'test_xfail.py X*'
E           and: ''
E           and: 'test_xfail.py x                                                          [100%]'
E           and: ''
E           and: '=========================== short test summary info ============================'
E           and: 'XFAIL test_xfail.py::test_function'
E           and: '  reason: The process gets terminated; pytest-forked reason: :-1: running the test CRASHED with signal 0'
E           and: '============================== 1 xfailed in 0.06s =============================='
E       remains unmatched: 'test_xfail.py X*'

/home/tkloczko/rpmbuild/BUILD/pytest-forked-1.3.0/testing/test_xfail_behavior.py:130: Failed
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
============================= test session starts ==============================
platform linux -- Python 3.8.9, pytest-6.2.3, py-1.10.0, pluggy-0.13.1
rootdir: /tmp/pytest-of-tkloczko/pytest-10/test_xfail3
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, asyncio-0.14.0, expect-1.1.0, cov-2.11.1, mock-3.5.1, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, flaky-3.7.0, cases-3.4.6, hypothesis-6.10.1, case-1.5.3, isort-1.3.0, aspectlib-1.5.2
collected 1 item

test_xfail.py x                                                          [100%]

=========================== short test summary info ============================
XFAIL test_xfail.py::test_function
  reason: The process gets terminated; pytest-forked reason: :-1: running the test CRASHED with signal 0
============================== 1 xfailed in 0.06s ==============================
========================================================================= short test summary info ==========================================================================
XFAIL testing/test_boxed.py::test_functional_boxed_capturing[sys]
  capture cleanup needed
XFAIL testing/test_boxed.py::test_functional_boxed_capturing[fd]
  capture cleanup needed
FAILED testing/test_boxed.py::test_functional_boxed_capturing[no] - Failed: nomatch: '*CRASHED*'
FAILED testing/test_xfail_behavior.py::test_xfail[strict xpass] - Failed: fnmatch: '*==== test session starts ====*'
FAILED testing/test_xfail_behavior.py::test_xfail[non-strict xpass] - Failed: fnmatch: '*==== test session starts ====*'
================================================================== 3 failed, 5 passed, 2 xfailed in 3.04s ==================================================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions