Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 894583 Details for
Bug 933098
dev-python/pytest-subprocess-1.5.0 fails tests
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
dev-python:pytest-subprocess-1.5.0:20240529-021706.log
dev-python:pytest-subprocess-1.5.0:20240529-021706.log (text/plain; charset=utf-8), 148.13 KB, created by
Jonathan Lovelace
on 2024-05-29 02:24:40 UTC
(
hide
)
Description:
dev-python:pytest-subprocess-1.5.0:20240529-021706.log
Filename:
MIME Type:
Creator:
Jonathan Lovelace
Created:
2024-05-29 02:24:40 UTC
Size:
148.13 KB
patch
obsolete
>[32m * [39;49;00mPackage: dev-python/pytest-subprocess-1.5.0:0 >[32m * [39;49;00mRepository: gentoo >[32m * [39;49;00mMaintainer: python@gentoo.org >[32m * [39;49;00mUSE: abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_python3_11 test >[32m * [39;49;00mFEATURES: distcc fakeroot network-sandbox preserve-libs sandbox test userpriv usersandbox >[32m * [39;49;00mPackage: dev-python/pytest-subprocess-1.5.0:0 >[32m * [39;49;00mRepository: gentoo >[32m * [39;49;00mMaintainer: python@gentoo.org >[32m * [39;49;00mUSE: abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_python3_11 test >[32m * [39;49;00mFEATURES: distcc fakeroot network-sandbox preserve-libs sandbox test userpriv usersandbox >>>> Unpacking source... >>>> Unpacking pytest-subprocess-1.5.0.gh.tar.gz to /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work >>>> Source unpacked in /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work >>>> Preparing source in /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0 ... > [32m*[0m Build system packages: > [32m*[0m dev-python/gpep517 : 15 > [32m*[0m dev-python/installer : 0.7.0 > [32m*[0m dev-python/setuptools : 69.5.1-r1 > [32m*[0m dev-python/setuptools-rust : 1.9.0 > [32m*[0m dev-python/setuptools-scm : 8.0.4 > [32m*[0m dev-python/wheel : 0.43.0 >>>> Source prepared. >>>> Configuring source in /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0 ... >>>> Source configured. >>>> Compiling source in /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0 ... > [32m*[0m python3_11: running distutils-r1_run_phase distutils-r1_python_compile > [32m*[0m Building the wheel for pytest-subprocess-1.5.0 via setuptools.build_meta:__legacy__ >python3.11 -m gpep517 build-wheel --prefix=/usr --backend setuptools.build_meta:__legacy__ --output-fd 3 --wheel-dir /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/wheel >2024-05-28 22:17:10,884 gpep517 INFO Building wheel via backend setuptools.build_meta:__legacy__ >2024-05-28 22:17:15,079 root INFO running bdist_wheel >2024-05-28 22:17:15,353 root INFO running build >2024-05-28 22:17:15,353 root INFO running build_py >2024-05-28 22:17:15,407 root WARNING file pytest_subprocess.py (for module pytest_subprocess) not found >2024-05-28 22:17:15,407 root INFO creating /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build >2024-05-28 22:17:15,408 root INFO creating /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib >2024-05-28 22:17:15,408 root INFO creating /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess >2024-05-28 22:17:15,408 root INFO copying pytest_subprocess/__init__.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess >2024-05-28 22:17:15,409 root INFO copying pytest_subprocess/utils.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess >2024-05-28 22:17:15,409 root INFO copying pytest_subprocess/exceptions.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess >2024-05-28 22:17:15,409 root INFO copying pytest_subprocess/fixtures.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess >2024-05-28 22:17:15,410 root INFO copying pytest_subprocess/fake_process.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess >2024-05-28 22:17:15,410 root INFO copying pytest_subprocess/process_recorder.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess >2024-05-28 22:17:15,410 root INFO copying pytest_subprocess/asyncio_subprocess.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess >2024-05-28 22:17:15,411 root INFO copying pytest_subprocess/fake_popen.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess >2024-05-28 22:17:15,411 root INFO copying pytest_subprocess/types.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess >2024-05-28 22:17:15,412 root INFO copying pytest_subprocess/process_dispatcher.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess >2024-05-28 22:17:15,412 root INFO copying pytest_subprocess/py.typed -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess >2024-05-28 22:17:15,413 root WARNING file pytest_subprocess.py (for module pytest_subprocess) not found >2024-05-28 22:17:15,413 root WARNING warning: build_py: byte-compiling is disabled, skipping. > >2024-05-28 22:17:15,521 wheel INFO installing to /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel >2024-05-28 22:17:15,521 root INFO running install >2024-05-28 22:17:15,533 root INFO running install_lib >2024-05-28 22:17:15,589 root INFO creating /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64 >2024-05-28 22:17:15,589 root INFO creating /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel >2024-05-28 22:17:15,589 root INFO creating /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel/pytest_subprocess >2024-05-28 22:17:15,590 root INFO copying /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess/__init__.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel/pytest_subprocess >2024-05-28 22:17:15,590 root INFO copying /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess/utils.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel/pytest_subprocess >2024-05-28 22:17:15,590 root INFO copying /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess/exceptions.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel/pytest_subprocess >2024-05-28 22:17:15,591 root INFO copying /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess/py.typed -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel/pytest_subprocess >2024-05-28 22:17:15,591 root INFO copying /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess/fixtures.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel/pytest_subprocess >2024-05-28 22:17:15,592 root INFO copying /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess/fake_process.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel/pytest_subprocess >2024-05-28 22:17:15,592 root INFO copying /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess/process_recorder.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel/pytest_subprocess >2024-05-28 22:17:15,592 root INFO copying /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess/asyncio_subprocess.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel/pytest_subprocess >2024-05-28 22:17:15,593 root INFO copying /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess/fake_popen.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel/pytest_subprocess >2024-05-28 22:17:15,593 root INFO copying /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess/types.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel/pytest_subprocess >2024-05-28 22:17:15,594 root INFO copying /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/lib/pytest_subprocess/process_dispatcher.py -> /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel/pytest_subprocess >2024-05-28 22:17:15,594 root WARNING warning: install_lib: byte-compiling is disabled, skipping. > >2024-05-28 22:17:15,594 root INFO running install_egg_info >2024-05-28 22:17:15,663 root INFO running egg_info >2024-05-28 22:17:15,663 root INFO creating pytest_subprocess.egg-info >2024-05-28 22:17:15,717 root INFO writing pytest_subprocess.egg-info/PKG-INFO >2024-05-28 22:17:15,720 root INFO writing dependency_links to pytest_subprocess.egg-info/dependency_links.txt >2024-05-28 22:17:15,720 root INFO writing entry points to pytest_subprocess.egg-info/entry_points.txt >2024-05-28 22:17:15,721 root INFO writing requirements to pytest_subprocess.egg-info/requires.txt >2024-05-28 22:17:15,722 root INFO writing top-level names to pytest_subprocess.egg-info/top_level.txt >2024-05-28 22:17:17,357 root INFO writing manifest file 'pytest_subprocess.egg-info/SOURCES.txt' >2024-05-28 22:17:17,359 root WARNING file pytest_subprocess.py (for module pytest_subprocess) not found >[05/28/24 22:17:17] ERROR listing git files failed - pretending there aren't any git.py:24 >2024-05-28 22:17:17,756 root INFO reading manifest file 'pytest_subprocess.egg-info/SOURCES.txt' >2024-05-28 22:17:17,757 root INFO reading manifest template 'MANIFEST.in' >2024-05-28 22:17:17,758 root WARNING warning: no previously-included files matching '__pycache__' found under directory '*' >2024-05-28 22:17:17,758 root WARNING warning: no previously-included files matching '*.py[co]' found under directory '*' >2024-05-28 22:17:17,758 root INFO adding license file 'LICENSE' >2024-05-28 22:17:17,759 root INFO writing manifest file 'pytest_subprocess.egg-info/SOURCES.txt' >2024-05-28 22:17:17,760 root INFO Copying pytest_subprocess.egg-info to /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel/pytest_subprocess-1.5.0-py3.11.egg-info >2024-05-28 22:17:17,762 root INFO running install_scripts >2024-05-28 22:17:17,769 wheel INFO creating /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel/pytest_subprocess-1.5.0.dist-info/WHEEL >2024-05-28 22:17:17,770 wheel INFO creating '/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/wheel/.tmp-bs_4865c/pytest_subprocess-1.5.0-py3-none-any.whl' and adding '/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel' to it >2024-05-28 22:17:17,770 wheel INFO adding 'pytest_subprocess/__init__.py' >2024-05-28 22:17:17,771 wheel INFO adding 'pytest_subprocess/asyncio_subprocess.py' >2024-05-28 22:17:17,771 wheel INFO adding 'pytest_subprocess/exceptions.py' >2024-05-28 22:17:17,772 wheel INFO adding 'pytest_subprocess/fake_popen.py' >2024-05-28 22:17:17,772 wheel INFO adding 'pytest_subprocess/fake_process.py' >2024-05-28 22:17:17,773 wheel INFO adding 'pytest_subprocess/fixtures.py' >2024-05-28 22:17:17,773 wheel INFO adding 'pytest_subprocess/process_dispatcher.py' >2024-05-28 22:17:17,774 wheel INFO adding 'pytest_subprocess/process_recorder.py' >2024-05-28 22:17:17,774 wheel INFO adding 'pytest_subprocess/py.typed' >2024-05-28 22:17:17,775 wheel INFO adding 'pytest_subprocess/types.py' >2024-05-28 22:17:17,775 wheel INFO adding 'pytest_subprocess/utils.py' >2024-05-28 22:17:17,776 wheel INFO adding 'pytest_subprocess-1.5.0.dist-info/LICENSE' >2024-05-28 22:17:17,776 wheel INFO adding 'pytest_subprocess-1.5.0.dist-info/METADATA' >2024-05-28 22:17:17,777 wheel INFO adding 'pytest_subprocess-1.5.0.dist-info/WHEEL' >2024-05-28 22:17:17,777 wheel INFO adding 'pytest_subprocess-1.5.0.dist-info/entry_points.txt' >2024-05-28 22:17:17,778 wheel INFO adding 'pytest_subprocess-1.5.0.dist-info/top_level.txt' >2024-05-28 22:17:17,778 wheel INFO adding 'pytest_subprocess-1.5.0.dist-info/RECORD' >2024-05-28 22:17:17,779 wheel INFO removing /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/build/bdist.linux-x86_64/wheel >2024-05-28 22:17:17,780 gpep517 INFO The backend produced /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/wheel/pytest_subprocess-1.5.0-py3-none-any.whl > [32m*[0m Installing pytest_subprocess-1.5.0-py3-none-any.whl to /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install >python3.11 -m gpep517 install-wheel --destdir=/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install --interpreter=/usr/bin/python3.11 --prefix=/usr --optimize=all /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/wheel/pytest_subprocess-1.5.0-py3-none-any.whl >2024-05-28 22:17:17,963 gpep517 INFO Installing /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/wheel/pytest_subprocess-1.5.0-py3-none-any.whl into /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install >2024-05-28 22:17:18,010 gpep517 INFO Installation complete >>>> Source compiled. >>>> Test phase: dev-python/pytest-subprocess-1.5.0 > [32m*[0m python3_11: running distutils-r1_run_phase python_test >python3.11 -m pytest -vv -ra -l -Wdefault -Werror::pytest.PytestUnhandledCoroutineWarning --color=yes -o console_output_style=count -o tmp_path_retention_count=0 -o tmp_path_retention_policy=failed -p no:cov -p no:flake8 -p no:flakes -p no:pylint -p no:markdown -p no:sugar -p no:xvfb -p no:pytest-describe -p no:plus -p no:tavern -p no:salt-factories -p no:flaky >[1m============================================================================= test session starts ==============================================================================[0m >platform linux -- Python 3.11.9, pytest-7.4.4, pluggy-1.5.0 -- /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11 >cachedir: .pytest_cache >hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase(PosixPath('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/.hypothesis/examples')) >rootdir: /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0 >configfile: pytest.ini >plugins: subprocess-1.5.0, hypothesis-6.98.18, time-machine-2.14.1, timeout-2.3.1, codeblocks-0.17.0, Faker-24.11.0, rerunfailures-14.0, forked-1.6.0, subtests-0.12.1, xdist-3.5.0, sphinx_pytest-0.2.0, console-scripts-1.4.1, anyio-4.3.0, expect-1.1.0, pyfakefs-5.4.1, mock-3.14.0, requests-mock-1.12.1, tornado-0.8.1, typeguard-4.2.1, betamax-0.9.0, xprocess-1.0.1, pkgcore-0.12.27, regressions-2.5.0, asyncio-0.23.6, trio-0.8.0, freezegun-0.4.2, aiohttp-1.0.5, pytest_param_files-0.6.0, pytest_httpserver-1.0.10, datadir-1.5.0, home-0.5.1, httpbin-2.0.0, services-2.2.1, django-4.8.0, jaraco.test-5.4.0 >asyncio: mode=Mode.STRICT >[1mcollecting ... [0mcollected 136 items > >tests/test_asyncio.py::test_basic_usage[shell] [32mPASSED[0m[32m [ 1/136][0m >tests/test_asyncio.py::test_basic_usage[exec] [32mPASSED[0m[33m [ 2/136][0m >tests/test_asyncio.py::test_with_arguments_shell[True] [32mPASSED[0m[33m [ 3/136][0m >tests/test_asyncio.py::test_with_arguments_shell[False] [32mPASSED[0m[33m [ 4/136][0m >tests/test_asyncio.py::test_with_arguments_exec[True] [32mPASSED[0m[33m [ 5/136][0m >tests/test_asyncio.py::test_with_arguments_exec[False] [32mPASSED[0m[33m [ 6/136][0m >tests/test_asyncio.py::test_incorrect_call[shell-True] [32mPASSED[0m[33m [ 7/136][0m >tests/test_asyncio.py::test_incorrect_call[shell-False] [32mPASSED[0m[33m [ 8/136][0m >tests/test_asyncio.py::test_incorrect_call[exec-True] [32mPASSED[0m[33m [ 9/136][0m >tests/test_asyncio.py::test_incorrect_call[exec-False] [32mPASSED[0m[33m [ 10/136][0m >tests/test_asyncio.py::test_invalid_event_loop[shell-True] [33mSKIPPED[0m (condition: sys.platform!="win32")[33m [ 11/136][0m >tests/test_asyncio.py::test_invalid_event_loop[shell-False] [33mSKIPPED[0m (condition: sys.platform!="win32")[33m [ 12/136][0m >tests/test_asyncio.py::test_invalid_event_loop[exec-True] [33mSKIPPED[0m (condition: sys.platform!="win32")[33m [ 13/136][0m >tests/test_asyncio.py::test_invalid_event_loop[exec-False] [33mSKIPPED[0m (condition: sys.platform!="win32")[33m [ 14/136][0m >tests/test_asyncio.py::test_wait[shell-False] [32mPASSED[0m[33m [ 15/136][0m >tests/test_asyncio.py::test_wait[shell-True] [32mPASSED[0m[33m [ 16/136][0m >tests/test_asyncio.py::test_wait[exec-False] [32mPASSED[0m[33m [ 17/136][0m >tests/test_asyncio.py::test_wait[exec-True] [32mPASSED[0m[33m [ 18/136][0m >tests/test_asyncio.py::test_devnull_stdout [32mPASSED[0m[33m [ 19/136][0m >tests/test_asyncio.py::test_anyio [32mPASSED[0m[33m [ 20/136][0m >tests/test_asyncio.py::test_stdout_and_stderr[False] [32mPASSED[0m[33m [ 21/136][0m >tests/test_asyncio.py::test_stdout_and_stderr[True] [32mPASSED[0m[33m [ 22/136][0m >tests/test_asyncio.py::test_combined_stdout_and_stderr[False] [32mPASSED[0m[33m [ 23/136][0m >tests/test_asyncio.py::test_combined_stdout_and_stderr[True] [32mPASSED[0m[33m [ 24/136][0m >tests/test_asyncio.py::test_input[False] [32mPASSED[0m[33m [ 25/136][0m >tests/test_asyncio.py::test_input[True] [32mPASSED[0m[33m [ 26/136][0m >tests/test_asyncio.py::test_popen_recorder [32mPASSED[0m[33m [ 27/136][0m >tests/test_examples.py::test_documentation[docs/index.rst] [32mPASSED[0m[33m [ 28/136][0m >tests/test_examples.py::test_documentation[README.rst] [32mPASSED[0m[33m [ 29/136][0m >tests/test_subprocess.py::test_legacy_usage [32mPASSED[0m[33m [ 30/136][0m >tests/test_subprocess.py::test_completedprocess_args[cmd0] [32mPASSED[0m[33m [ 31/136][0m >tests/test_subprocess.py::test_completedprocess_args[cmd1] [32mPASSED[0m[33m [ 32/136][0m >tests/test_subprocess.py::test_completedprocess_args_path[str] [32mPASSED[0m[33m [ 33/136][0m >tests/test_subprocess.py::test_completedprocess_args_path[path,str] [32mPASSED[0m[33m [ 34/136][0m >tests/test_subprocess.py::test_completedprocess_args_path[str,path] [32mPASSED[0m[33m [ 35/136][0m >tests/test_subprocess.py::test_completedprocess_args_path[path] [32mPASSED[0m[33m [ 36/136][0m >tests/test_subprocess.py::test_called_process_error[cmd] [32mPASSED[0m[33m [ 37/136][0m >tests/test_subprocess.py::test_called_process_error[cmd1] [32mPASSED[0m[33m [ 38/136][0m >tests/test_subprocess.py::test_called_process_error_with_any[cmd] [32mPASSED[0m[33m [ 39/136][0m >tests/test_subprocess.py::test_called_process_error_with_any[cmd1] [32mPASSED[0m[33m [ 40/136][0m >tests/test_subprocess.py::test_keep_last_process_error_with_any [32mPASSED[0m[33m [ 41/136][0m >tests/test_subprocess.py::test_multiple_levels [32mPASSED[0m[33m [ 42/136][0m >tests/test_subprocess.py::test_not_registered [32mPASSED[0m[33m [ 43/136][0m >tests/test_subprocess.py::test_context [32mPASSED[0m[33m [ 44/136][0m >tests/test_subprocess.py::test_basic_process[str-False] [31mFAILED[0m[31m [ 45/136][0m >tests/test_subprocess.py::test_basic_process[str-True] [32mPASSED[0m[31m [ 46/136][0m >tests/test_subprocess.py::test_basic_process[path,str-False] [31mFAILED[0m[31m [ 47/136][0m >tests/test_subprocess.py::test_basic_process[path,str-True] [32mPASSED[0m[31m [ 48/136][0m >tests/test_subprocess.py::test_basic_process[str,path-False] [31mFAILED[0m[31m [ 49/136][0m >tests/test_subprocess.py::test_basic_process[str,path-True] [32mPASSED[0m[31m [ 50/136][0m >tests/test_subprocess.py::test_basic_process[path-False] [31mFAILED[0m[31m [ 51/136][0m >tests/test_subprocess.py::test_basic_process[path-True] [32mPASSED[0m[31m [ 52/136][0m >tests/test_subprocess.py::test_basic_process_merge_streams[False] [31mFAILED[0m[31m [ 53/136][0m >tests/test_subprocess.py::test_basic_process_merge_streams[True] [32mPASSED[0m[31m [ 54/136][0m >tests/test_subprocess.py::test_wait[False] [31mFAILED[0m[31m [ 55/136][0m >tests/test_subprocess.py::test_wait[True] [32mPASSED[0m[31m [ 56/136][0m >tests/test_subprocess.py::test_check_output[False] [31mFAILED[0m[31m [ 57/136][0m >tests/test_subprocess.py::test_check_output[True] [32mPASSED[0m[31m [ 58/136][0m >tests/test_subprocess.py::test_check_call[False] [31mFAILED[0m[31m [ 59/136][0m >tests/test_subprocess.py::test_check_call[True] [32mPASSED[0m[31m [ 60/136][0m >tests/test_subprocess.py::test_call[False] [31mFAILED[0m[31m [ 61/136][0m >tests/test_subprocess.py::test_call[True] [32mPASSED[0m[31m [ 62/136][0m >tests/test_subprocess.py::test_run[False] [31mFAILED[0m[31m [ 63/136][0m >tests/test_subprocess.py::test_run[True] [32mPASSED[0m[31m [ 64/136][0m >tests/test_subprocess.py::test_universal_newlines[False] [31mFAILED[0m[31m [ 65/136][0m >tests/test_subprocess.py::test_universal_newlines[True] [32mPASSED[0m[31m [ 66/136][0m >tests/test_subprocess.py::test_text[False] [31mFAILED[0m[31m [ 67/136][0m >tests/test_subprocess.py::test_text[True] [32mPASSED[0m[31m [ 68/136][0m >tests/test_subprocess.py::test_binary [32mPASSED[0m[31m [ 69/136][0m >tests/test_subprocess.py::test_empty_stdout [32mPASSED[0m[31m [ 70/136][0m >tests/test_subprocess.py::test_empty_stdout_list [32mPASSED[0m[31m [ 71/136][0m >tests/test_subprocess.py::test_input[False] [31mFAILED[0m[31m [ 72/136][0m >tests/test_subprocess.py::test_input[True] [32mPASSED[0m[31m [ 73/136][0m >tests/test_subprocess.py::test_ambiguous_input[False] [31mFAILED[0m[31m [ 74/136][0m >tests/test_subprocess.py::test_ambiguous_input[True] [32mPASSED[0m[31m [ 75/136][0m >tests/test_subprocess.py::test_multiple_wait[False] [31mFAILED[0m[31m [ 76/136][0m >tests/test_subprocess.py::test_multiple_wait[True] [32mPASSED[0m[31m [ 77/136][0m >tests/test_subprocess.py::test_wrong_arguments [32mPASSED[0m[31m [ 78/136][0m >tests/test_subprocess.py::test_callback [32mPASSED[0m[31m [ 79/136][0m >tests/test_subprocess.py::test_mutiple_occurrences [32mPASSED[0m[31m [ 80/136][0m >tests/test_subprocess.py::test_different_output [32mPASSED[0m[31m [ 81/136][0m >tests/test_subprocess.py::test_different_output_with_context [32mPASSED[0m[31m [ 82/136][0m >tests/test_subprocess.py::test_different_output_with_context_multilevel [32mPASSED[0m[31m [ 83/136][0m >tests/test_subprocess.py::test_multiple_level_early_consuming [32mPASSED[0m[31m [ 84/136][0m >tests/test_subprocess.py::test_keep_last_process [32mPASSED[0m[31m [ 85/136][0m >tests/test_subprocess.py::test_git [32mPASSED[0m[31m [ 86/136][0m >tests/test_subprocess.py::test_use_real [31mFAILED[0m[31m [ 87/136][0m >tests/test_subprocess.py::test_real_process [31mFAILED[0m[31m [ 88/136][0m >tests/test_subprocess.py::test_context_manager [32mPASSED[0m[31m [ 89/136][0m >tests/test_subprocess.py::test_raise_exception [32mPASSED[0m[31m [ 90/136][0m >tests/test_subprocess.py::test_callback_with_arguments [32mPASSED[0m[31m [ 91/136][0m >tests/test_subprocess.py::test_subprocess_pipe_without_stream_definition [32mPASSED[0m[31m [ 92/136][0m >tests/test_subprocess.py::test_different_command_type[command0] [32mPASSED[0m[31m [ 93/136][0m >tests/test_subprocess.py::test_different_command_type[test] [32mPASSED[0m[31m [ 94/136][0m >tests/test_subprocess.py::test_different_command_type_complex_command[command0] [32mPASSED[0m[31m [ 95/136][0m >tests/test_subprocess.py::test_different_command_type_complex_command[test with arguments] [32mPASSED[0m[31m [ 96/136][0m >tests/test_subprocess.py::test_raise_exception_check_output [32mPASSED[0m[31m [ 97/136][0m >tests/test_subprocess.py::test_callback_and_return_code [32mPASSED[0m[31m [ 98/136][0m >tests/test_subprocess.py::test_encoding[False-encoding] [31mFAILED[0m[31m [ 99/136][0m >tests/test_subprocess.py::test_encoding[False-errors] [31mFAILED[0m[31m [100/136][0m >tests/test_subprocess.py::test_encoding[True-encoding] [32mPASSED[0m[31m [101/136][0m >tests/test_subprocess.py::test_encoding[True-errors] [32mPASSED[0m[31m [102/136][0m >tests/test_subprocess.py::test_string_or_tuple[ls -lah] [32mPASSED[0m[31m [103/136][0m >tests/test_subprocess.py::test_string_or_tuple[command1] [32mPASSED[0m[31m [104/136][0m >tests/test_subprocess.py::test_with_wildcards [32mPASSED[0m[31m [105/136][0m >tests/test_subprocess.py::test_with_program [32mPASSED[0m[31m [106/136][0m >tests/test_subprocess.py::test_call_count [32mPASSED[0m[31m [107/136][0m >tests/test_subprocess.py::test_called_process_waits_for_the_callback_to_finish [32mPASSED[0m[31m [108/136][0m >tests/test_subprocess.py::test_raises_exceptions_from_callback[wait] [32mPASSED[0m[31m [109/136][0m >tests/test_subprocess.py::test_raises_exceptions_from_callback[communicate] [32mPASSED[0m[31m [110/136][0m >tests/test_subprocess.py::test_allow_unregistered_cleaning [31mFAILED[0m[31m [111/136][0m >tests/test_subprocess.py::test_keep_last_process_cleaning [32mPASSED[0m[31m [112/136][0m >tests/test_subprocess.py::test_signals [32mPASSED[0m[31m [113/136][0m >tests/test_subprocess.py::test_signal_callback [32mPASSED[0m[31m [114/136][0m >tests/test_subprocess.py::test_non_piped_streams[True-False] [31mFAILED[0m[31m [115/136][0m >tests/test_subprocess.py::test_non_piped_streams[True-True] [32mPASSED[0m[31m [116/136][0m >tests/test_subprocess.py::test_non_piped_streams[False-False] [31mFAILED[0m[31m [117/136][0m >tests/test_subprocess.py::test_non_piped_streams[False-True] [32mPASSED[0m[31m [118/136][0m >tests/test_subprocess.py::test_non_piped_same_file[True-False] [31mFAILED[0m[31m [119/136][0m >tests/test_subprocess.py::test_non_piped_same_file[True-True] [32mPASSED[0m[31m [120/136][0m >tests/test_subprocess.py::test_non_piped_same_file[False-False] [31mFAILED[0m[31m [121/136][0m >tests/test_subprocess.py::test_non_piped_same_file[False-True] [32mPASSED[0m[31m [122/136][0m >tests/test_subprocess.py::test_process_recorder [32mPASSED[0m[31m [123/136][0m >tests/test_typing.py::test_typing [32mPASSED[0m[31m [124/136][0m >tests/test_utils.py::test_simple_command[whoami] [32mPASSED[0m[31m [125/136][0m >tests/test_utils.py::test_simple_command[command1] [32mPASSED[0m[31m [126/136][0m >tests/test_utils.py::test_more_complex_command[test command] [32mPASSED[0m[31m [127/136][0m >tests/test_utils.py::test_more_complex_command[command1] [32mPASSED[0m[31m [128/136][0m >tests/test_utils.py::test_simple_wildcards [32mPASSED[0m[31m [129/136][0m >tests/test_utils.py::test_more_complex_wildcards [32mPASSED[0m[31m [130/136][0m >tests/test_utils.py::test_any_max [32mPASSED[0m[31m [131/136][0m >tests/test_utils.py::test_any_min [32mPASSED[0m[31m [132/136][0m >tests/test_utils.py::test_min_max_combined [32mPASSED[0m[31m [133/136][0m >tests/test_utils.py::test_invalid_instantiation [32mPASSED[0m[31m [134/136][0m >tests/test_utils.py::test_str_conversions [32mPASSED[0m[31m [135/136][0m >tests/test_utils.py::test_command_iter [32mPASSED[0m[31m [136/136][0m > >=================================================================================== FAILURES =================================================================================== >[31m[1m________________________________________________________________________ test_basic_process[str-False] _________________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a5079c50>, fake = False, rtype = <class 'str'>, ptype = <class 'str'> > > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [37m@path_or_str[39;49;00m[90m[39;49;00m > [94mdef[39;49;00m [92mtest_basic_process[39;49;00m(fp, fake, rtype, ptype):[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([90m[39;49;00m > [rtype(PYTHON), [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=[[33m"[39;49;00m[33mStdout line 1[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mStdout line 2[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stderr=[94mNone[39;49;00m,[90m[39;49;00m > )[90m[39;49;00m > [90m[39;49;00m > [94mif[39;49;00m sys.platform.startswith([33m"[39;49;00m[33mwin[39;49;00m[33m"[39;49;00m) [95mand[39;49;00m sys.version_info < ([94m3[39;49;00m, [94m8[39;49;00m) [95mand[39;49;00m ptype [95mis[39;49;00m Path:[90m[39;49;00m > condition = pytest.raises([96mTypeError[39;49;00m)[90m[39;49;00m > [90m[39;49;00m > [94melse[39;49;00m:[90m[39;49;00m > [90m[39;49;00m > [37m@contextlib[39;49;00m.contextmanager[90m[39;49;00m > [94mdef[39;49;00m [92mnull_context[39;49;00m():[90m[39;49;00m > [94myield[39;49;00m[90m[39;49;00m > [90m[39;49;00m > condition = null_context()[90m[39;49;00m > [90m[39;49;00m > [94mwith[39;49;00m condition:[90m[39;49;00m > process = subprocess.Popen([90m[39;49;00m > [ptype(PYTHON), [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > cwd=os.path.dirname([91m__file__[39;49;00m),[90m[39;49;00m > stdout=subprocess.PIPE,[90m[39;49;00m > stderr=subprocess.PIPE,[90m[39;49;00m > )[90m[39;49;00m >> out, err = process.communicate()[90m[39;49;00m >[1m[31mE AttributeError: 'tuple' object has no attribute 'communicate'[0m > >condition = <contextlib._GeneratorContextManager object at 0x7fd5a4185450> >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a5079c50> >null_context = <function test_basic_process.<locals>.null_context at 0x7fd5a4ed6700> >process = (['/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > 'example_script.py'], > (), > {'cwd': '/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests', > 'stderr': -1, > 'stdout': -1}) >ptype = <class 'str'> >rtype = <class 'str'> > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:214: AttributeError >[31m[1m______________________________________________________________________ test_basic_process[path,str-False] ______________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a4155c10>, fake = False, rtype = <class 'pathlib.Path'>, ptype = <class 'str'> > > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [37m@path_or_str[39;49;00m[90m[39;49;00m > [94mdef[39;49;00m [92mtest_basic_process[39;49;00m(fp, fake, rtype, ptype):[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([90m[39;49;00m > [rtype(PYTHON), [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=[[33m"[39;49;00m[33mStdout line 1[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mStdout line 2[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stderr=[94mNone[39;49;00m,[90m[39;49;00m > )[90m[39;49;00m > [90m[39;49;00m > [94mif[39;49;00m sys.platform.startswith([33m"[39;49;00m[33mwin[39;49;00m[33m"[39;49;00m) [95mand[39;49;00m sys.version_info < ([94m3[39;49;00m, [94m8[39;49;00m) [95mand[39;49;00m ptype [95mis[39;49;00m Path:[90m[39;49;00m > condition = pytest.raises([96mTypeError[39;49;00m)[90m[39;49;00m > [90m[39;49;00m > [94melse[39;49;00m:[90m[39;49;00m > [90m[39;49;00m > [37m@contextlib[39;49;00m.contextmanager[90m[39;49;00m > [94mdef[39;49;00m [92mnull_context[39;49;00m():[90m[39;49;00m > [94myield[39;49;00m[90m[39;49;00m > [90m[39;49;00m > condition = null_context()[90m[39;49;00m > [90m[39;49;00m > [94mwith[39;49;00m condition:[90m[39;49;00m > process = subprocess.Popen([90m[39;49;00m > [ptype(PYTHON), [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > cwd=os.path.dirname([91m__file__[39;49;00m),[90m[39;49;00m > stdout=subprocess.PIPE,[90m[39;49;00m > stderr=subprocess.PIPE,[90m[39;49;00m > )[90m[39;49;00m >> out, err = process.communicate()[90m[39;49;00m >[1m[31mE AttributeError: 'tuple' object has no attribute 'communicate'[0m > >condition = <contextlib._GeneratorContextManager object at 0x7fd5a4529f50> >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a4155c10> >null_context = <function test_basic_process.<locals>.null_context at 0x7fd59f6c6ac0> >process = (['/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > 'example_script.py'], > (), > {'cwd': '/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests', > 'stderr': -1, > 'stdout': -1}) >ptype = <class 'str'> >rtype = <class 'pathlib.Path'> > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:214: AttributeError >[31m[1m______________________________________________________________________ test_basic_process[str,path-False] ______________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a4404410>, fake = False, rtype = <class 'str'>, ptype = <class 'pathlib.Path'> > > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [37m@path_or_str[39;49;00m[90m[39;49;00m > [94mdef[39;49;00m [92mtest_basic_process[39;49;00m(fp, fake, rtype, ptype):[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([90m[39;49;00m > [rtype(PYTHON), [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=[[33m"[39;49;00m[33mStdout line 1[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mStdout line 2[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stderr=[94mNone[39;49;00m,[90m[39;49;00m > )[90m[39;49;00m > [90m[39;49;00m > [94mif[39;49;00m sys.platform.startswith([33m"[39;49;00m[33mwin[39;49;00m[33m"[39;49;00m) [95mand[39;49;00m sys.version_info < ([94m3[39;49;00m, [94m8[39;49;00m) [95mand[39;49;00m ptype [95mis[39;49;00m Path:[90m[39;49;00m > condition = pytest.raises([96mTypeError[39;49;00m)[90m[39;49;00m > [90m[39;49;00m > [94melse[39;49;00m:[90m[39;49;00m > [90m[39;49;00m > [37m@contextlib[39;49;00m.contextmanager[90m[39;49;00m > [94mdef[39;49;00m [92mnull_context[39;49;00m():[90m[39;49;00m > [94myield[39;49;00m[90m[39;49;00m > [90m[39;49;00m > condition = null_context()[90m[39;49;00m > [90m[39;49;00m > [94mwith[39;49;00m condition:[90m[39;49;00m > process = subprocess.Popen([90m[39;49;00m > [ptype(PYTHON), [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > cwd=os.path.dirname([91m__file__[39;49;00m),[90m[39;49;00m > stdout=subprocess.PIPE,[90m[39;49;00m > stderr=subprocess.PIPE,[90m[39;49;00m > )[90m[39;49;00m >> out, err = process.communicate()[90m[39;49;00m >[1m[31mE AttributeError: 'tuple' object has no attribute 'communicate'[0m > >condition = <contextlib._GeneratorContextManager object at 0x7fd5a4404bd0> >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a4404410> >null_context = <function test_basic_process.<locals>.null_context at 0x7fd59f6c7600> >process = ([PosixPath('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11'), > 'example_script.py'], > (), > {'cwd': '/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests', > 'stderr': -1, > 'stdout': -1}) >ptype = <class 'pathlib.Path'> >rtype = <class 'str'> > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:214: AttributeError >[31m[1m________________________________________________________________________ test_basic_process[path-False] ________________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a41c6290>, fake = False, rtype = <class 'pathlib.Path'>, ptype = <class 'pathlib.Path'> > > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [37m@path_or_str[39;49;00m[90m[39;49;00m > [94mdef[39;49;00m [92mtest_basic_process[39;49;00m(fp, fake, rtype, ptype):[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([90m[39;49;00m > [rtype(PYTHON), [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=[[33m"[39;49;00m[33mStdout line 1[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mStdout line 2[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stderr=[94mNone[39;49;00m,[90m[39;49;00m > )[90m[39;49;00m > [90m[39;49;00m > [94mif[39;49;00m sys.platform.startswith([33m"[39;49;00m[33mwin[39;49;00m[33m"[39;49;00m) [95mand[39;49;00m sys.version_info < ([94m3[39;49;00m, [94m8[39;49;00m) [95mand[39;49;00m ptype [95mis[39;49;00m Path:[90m[39;49;00m > condition = pytest.raises([96mTypeError[39;49;00m)[90m[39;49;00m > [90m[39;49;00m > [94melse[39;49;00m:[90m[39;49;00m > [90m[39;49;00m > [37m@contextlib[39;49;00m.contextmanager[90m[39;49;00m > [94mdef[39;49;00m [92mnull_context[39;49;00m():[90m[39;49;00m > [94myield[39;49;00m[90m[39;49;00m > [90m[39;49;00m > condition = null_context()[90m[39;49;00m > [90m[39;49;00m > [94mwith[39;49;00m condition:[90m[39;49;00m > process = subprocess.Popen([90m[39;49;00m > [ptype(PYTHON), [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > cwd=os.path.dirname([91m__file__[39;49;00m),[90m[39;49;00m > stdout=subprocess.PIPE,[90m[39;49;00m > stderr=subprocess.PIPE,[90m[39;49;00m > )[90m[39;49;00m >> out, err = process.communicate()[90m[39;49;00m >[1m[31mE AttributeError: 'tuple' object has no attribute 'communicate'[0m > >condition = <contextlib._GeneratorContextManager object at 0x7fd5a41c75d0> >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a41c6290> >null_context = <function test_basic_process.<locals>.null_context at 0x7fd59f550180> >process = ([PosixPath('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11'), > 'example_script.py'], > (), > {'cwd': '/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests', > 'stderr': -1, > 'stdout': -1}) >ptype = <class 'pathlib.Path'> >rtype = <class 'pathlib.Path'> > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:214: AttributeError >[31m[1m___________________________________________________________________ test_basic_process_merge_streams[False] ____________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5ab2abc90>, fake = False > > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [94mdef[39;49;00m [92mtest_basic_process_merge_streams[39;49;00m(fp, fake):[90m[39;49;00m > [90m [39;49;00m[33m"""Stderr is merged into stdout."""[39;49;00m[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33m-u[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mstderr[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=[[33m"[39;49;00m[33mStdout line 1[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mStdout line 2[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stderr=[[33m"[39;49;00m[33mStderr line 1[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > )[90m[39;49;00m > [90m[39;49;00m > process = subprocess.Popen([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33m-u[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mstderr[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > cwd=os.path.dirname([91m__file__[39;49;00m),[90m[39;49;00m > stdout=subprocess.PIPE,[90m[39;49;00m > stderr=subprocess.STDOUT,[90m[39;49;00m > )[90m[39;49;00m >> out, err = process.communicate()[90m[39;49;00m >[1m[31mE AttributeError: 'tuple' object has no attribute 'communicate'[0m > >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5ab2abc90> >process = (['/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > '-u', > 'example_script.py', > 'stderr'], > (), > {'cwd': '/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests', > 'stderr': -2, > 'stdout': -1}) > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:242: AttributeError >[31m[1m_______________________________________________________________________________ test_wait[False] _______________________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5ab295850>, fake = False > > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [94mdef[39;49;00m [92mtest_wait[39;49;00m(fp, fake):[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mwait[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mstderr[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=[33m"[39;49;00m[33mStdout line 1[39;49;00m[33m\n[39;49;00m[33mStdout line 2[39;49;00m[33m"[39;49;00m,[90m[39;49;00m > stderr=[33m"[39;49;00m[33mStderr line 1[39;49;00m[33m"[39;49;00m,[90m[39;49;00m > wait=[94m0.5[39;49;00m,[90m[39;49;00m > )[90m[39;49;00m > process = subprocess.Popen([90m[39;49;00m > (PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mwait[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mstderr[39;49;00m[33m"[39;49;00m),[90m[39;49;00m > cwd=os.path.dirname([91m__file__[39;49;00m),[90m[39;49;00m > stdout=subprocess.PIPE,[90m[39;49;00m > stderr=subprocess.STDOUT,[90m[39;49;00m > )[90m[39;49;00m > [90m[39;49;00m >> [94massert[39;49;00m process.returncode [95mis[39;49;00m [94mNone[39;49;00m[90m[39;49;00m >[1m[31mE AttributeError: 'tuple' object has no attribute 'returncode'[0m > >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5ab295850> >process = (('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > 'example_script.py', > 'wait', > 'stderr'), > (), > {'cwd': '/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests', > 'stderr': -2, > 'stdout': -1}) > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:269: AttributeError >[31m[1m___________________________________________________________________________ test_check_output[False] ___________________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd59f501490>, fake = False > > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [94mdef[39;49;00m [92mtest_check_output[39;49;00m(fp, fake):[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=[33m"[39;49;00m[33mStdout line 1[39;49;00m[33m\n[39;49;00m[33mStdout line 2[39;49;00m[33m"[39;49;00m,[90m[39;49;00m > )[90m[39;49;00m >> process = subprocess.check_output((PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m))[90m[39;49;00m > >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd59f501490> > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:290: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >[1m[31m/usr/lib/python3.11/subprocess.py[0m:466: in check_output > [94mreturn[39;49;00m run(*popenargs, stdout=PIPE, timeout=timeout, check=[94mTrue[39;49;00m,[90m[39;49;00m > kw = 'check' > kwargs = {} > popenargs = (('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > 'example_script.py'),) > timeout = None >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >input = None, capture_output = False, timeout = None, check = True >popenargs = (('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', 'example_script.py'),) >kwargs = {'stdout': -1} > > [94mdef[39;49;00m [92mrun[39;49;00m(*popenargs,[90m[39;49;00m > [96minput[39;49;00m=[94mNone[39;49;00m, capture_output=[94mFalse[39;49;00m, timeout=[94mNone[39;49;00m, check=[94mFalse[39;49;00m, **kwargs):[90m[39;49;00m > [90m [39;49;00m[33m"""Run command with arguments and return a CompletedProcess instance.[39;49;00m > [33m[39;49;00m > [33m The returned instance will have attributes args, returncode, stdout and[39;49;00m > [33m stderr. By default, stdout and stderr are not captured, and those attributes[39;49;00m > [33m will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,[39;49;00m > [33m or pass capture_output=True to capture both.[39;49;00m > [33m[39;49;00m > [33m If check is True and the exit code was non-zero, it raises a[39;49;00m > [33m CalledProcessError. The CalledProcessError object will have the return code[39;49;00m > [33m in the returncode attribute, and output & stderr attributes if those streams[39;49;00m > [33m were captured.[39;49;00m > [33m[39;49;00m > [33m If timeout is given, and the process takes too long, a TimeoutExpired[39;49;00m > [33m exception will be raised.[39;49;00m > [33m[39;49;00m > [33m There is an optional argument "input", allowing you to[39;49;00m > [33m pass bytes or a string to the subprocess's stdin. If you use this argument[39;49;00m > [33m you may not also use the Popen constructor's "stdin" argument, as[39;49;00m > [33m it will be used internally.[39;49;00m > [33m[39;49;00m > [33m By default, all communication is in bytes, and therefore any "input" should[39;49;00m > [33m be bytes, and the stdout and stderr will be bytes. If in text mode, any[39;49;00m > [33m "input" should be a string, and stdout and stderr will be strings decoded[39;49;00m > [33m according to locale encoding, or by "encoding" if set. Text mode is[39;49;00m > [33m triggered by setting any of text, encoding, errors or universal_newlines.[39;49;00m > [33m[39;49;00m > [33m The other arguments are the same as for the Popen constructor.[39;49;00m > [33m """[39;49;00m[90m[39;49;00m > [94mif[39;49;00m [96minput[39;49;00m [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mif[39;49;00m kwargs.get([33m'[39;49;00m[33mstdin[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mraise[39;49;00m [96mValueError[39;49;00m([33m'[39;49;00m[33mstdin and input arguments may not both be used.[39;49;00m[33m'[39;49;00m)[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstdin[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > [90m[39;49;00m > [94mif[39;49;00m capture_output:[90m[39;49;00m > [94mif[39;49;00m kwargs.get([33m'[39;49;00m[33mstdout[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m [95mor[39;49;00m kwargs.get([33m'[39;49;00m[33mstderr[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mraise[39;49;00m [96mValueError[39;49;00m([33m'[39;49;00m[33mstdout and stderr arguments may not be used [39;49;00m[33m'[39;49;00m[90m[39;49;00m > [33m'[39;49;00m[33mwith capture_output.[39;49;00m[33m'[39;49;00m)[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstdout[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstderr[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > [90m[39;49;00m >> [94mwith[39;49;00m Popen(*popenargs, **kwargs) [94mas[39;49;00m process:[90m[39;49;00m >[1m[31mE TypeError: 'tuple' object does not support the context manager protocol[0m > >capture_output = False >check = True >input = None >kwargs = {'stdout': -1} >popenargs = (('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > 'example_script.py'),) >timeout = None > >[1m[31m/usr/lib/python3.11/subprocess.py[0m:548: TypeError >[31m[1m____________________________________________________________________________ test_check_call[False] ____________________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a40b1790>, fake = False > > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [94mdef[39;49;00m [92mtest_check_call[39;49;00m(fp, fake):[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=[33m"[39;49;00m[33mStdout line 1[39;49;00m[33m\n[39;49;00m[33mStdout line 2[39;49;00m[33m\n[39;49;00m[33m"[39;49;00m,[90m[39;49;00m > )[90m[39;49;00m > fp.register([PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mnon-zero[39;49;00m[33m"[39;49;00m], returncode=[94m1[39;49;00m)[90m[39;49;00m >> [94massert[39;49;00m subprocess.check_call((PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m)) == [94m0[39;49;00m[90m[39;49;00m > >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a40b1790> > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:304: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >[1m[31m/usr/lib/python3.11/subprocess.py[0m:408: in check_call > retcode = call(*popenargs, **kwargs)[90m[39;49;00m > kwargs = {} > popenargs = (('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > 'example_script.py'),) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >timeout = None, popenargs = (('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', 'example_script.py'),) >kwargs = {} > > [94mdef[39;49;00m [92mcall[39;49;00m(*popenargs, timeout=[94mNone[39;49;00m, **kwargs):[90m[39;49;00m > [90m [39;49;00m[33m"""Run command with arguments. Wait for command to complete or[39;49;00m > [33m timeout, then return the returncode attribute.[39;49;00m > [33m[39;49;00m > [33m The arguments are the same as for the Popen constructor. Example:[39;49;00m > [33m[39;49;00m > [33m retcode = call(["ls", "-l"])[39;49;00m > [33m """[39;49;00m[90m[39;49;00m >> [94mwith[39;49;00m Popen(*popenargs, **kwargs) [94mas[39;49;00m p:[90m[39;49;00m >[1m[31mE TypeError: 'tuple' object does not support the context manager protocol[0m > >kwargs = {} >popenargs = (('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > 'example_script.py'),) >timeout = None > >[1m[31m/usr/lib/python3.11/subprocess.py[0m:389: TypeError >[31m[1m_______________________________________________________________________________ test_call[False] _______________________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a4ececd0>, fake = False > > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [94mdef[39;49;00m [92mtest_call[39;49;00m(fp, fake):[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=[33m"[39;49;00m[33mStdout line 1[39;49;00m[33m\n[39;49;00m[33mStdout line 2[39;49;00m[33m\n[39;49;00m[33m"[39;49;00m,[90m[39;49;00m > )[90m[39;49;00m >> [94massert[39;49;00m subprocess.call((PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m)) == [94m0[39;49;00m[90m[39;49;00m > >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a4ececd0> > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:326: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >timeout = None, popenargs = (('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', 'example_script.py'),) >kwargs = {} > > [94mdef[39;49;00m [92mcall[39;49;00m(*popenargs, timeout=[94mNone[39;49;00m, **kwargs):[90m[39;49;00m > [90m [39;49;00m[33m"""Run command with arguments. Wait for command to complete or[39;49;00m > [33m timeout, then return the returncode attribute.[39;49;00m > [33m[39;49;00m > [33m The arguments are the same as for the Popen constructor. Example:[39;49;00m > [33m[39;49;00m > [33m retcode = call(["ls", "-l"])[39;49;00m > [33m """[39;49;00m[90m[39;49;00m >> [94mwith[39;49;00m Popen(*popenargs, **kwargs) [94mas[39;49;00m p:[90m[39;49;00m >[1m[31mE TypeError: 'tuple' object does not support the context manager protocol[0m > >kwargs = {} >popenargs = (('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > 'example_script.py'),) >timeout = None > >[1m[31m/usr/lib/python3.11/subprocess.py[0m:389: TypeError >[31m[1m_______________________________________________________________________________ test_run[False] ________________________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a451b650>, fake = False > > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [37m@pytest[39;49;00m.mark.skipif([90m[39;49;00m > sys.version_info <= ([94m3[39;49;00m, [94m5[39;49;00m),[90m[39;49;00m > reason=[33m"[39;49;00m[33msubprocess.run() was introduced in python3.4[39;49;00m[33m"[39;49;00m,[90m[39;49;00m > )[90m[39;49;00m > [94mdef[39;49;00m [92mtest_run[39;49;00m(fp, fake):[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=[[33m"[39;49;00m[33mStdout line 1[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mStdout line 2[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > )[90m[39;49;00m >> process = subprocess.run((PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m), stdout=subprocess.PIPE)[90m[39;49;00m > >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a451b650> > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:341: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >input = None, capture_output = False, timeout = None, check = False >popenargs = (('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', 'example_script.py'),) >kwargs = {'stdout': -1} > > [94mdef[39;49;00m [92mrun[39;49;00m(*popenargs,[90m[39;49;00m > [96minput[39;49;00m=[94mNone[39;49;00m, capture_output=[94mFalse[39;49;00m, timeout=[94mNone[39;49;00m, check=[94mFalse[39;49;00m, **kwargs):[90m[39;49;00m > [90m [39;49;00m[33m"""Run command with arguments and return a CompletedProcess instance.[39;49;00m > [33m[39;49;00m > [33m The returned instance will have attributes args, returncode, stdout and[39;49;00m > [33m stderr. By default, stdout and stderr are not captured, and those attributes[39;49;00m > [33m will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,[39;49;00m > [33m or pass capture_output=True to capture both.[39;49;00m > [33m[39;49;00m > [33m If check is True and the exit code was non-zero, it raises a[39;49;00m > [33m CalledProcessError. The CalledProcessError object will have the return code[39;49;00m > [33m in the returncode attribute, and output & stderr attributes if those streams[39;49;00m > [33m were captured.[39;49;00m > [33m[39;49;00m > [33m If timeout is given, and the process takes too long, a TimeoutExpired[39;49;00m > [33m exception will be raised.[39;49;00m > [33m[39;49;00m > [33m There is an optional argument "input", allowing you to[39;49;00m > [33m pass bytes or a string to the subprocess's stdin. If you use this argument[39;49;00m > [33m you may not also use the Popen constructor's "stdin" argument, as[39;49;00m > [33m it will be used internally.[39;49;00m > [33m[39;49;00m > [33m By default, all communication is in bytes, and therefore any "input" should[39;49;00m > [33m be bytes, and the stdout and stderr will be bytes. If in text mode, any[39;49;00m > [33m "input" should be a string, and stdout and stderr will be strings decoded[39;49;00m > [33m according to locale encoding, or by "encoding" if set. Text mode is[39;49;00m > [33m triggered by setting any of text, encoding, errors or universal_newlines.[39;49;00m > [33m[39;49;00m > [33m The other arguments are the same as for the Popen constructor.[39;49;00m > [33m """[39;49;00m[90m[39;49;00m > [94mif[39;49;00m [96minput[39;49;00m [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mif[39;49;00m kwargs.get([33m'[39;49;00m[33mstdin[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mraise[39;49;00m [96mValueError[39;49;00m([33m'[39;49;00m[33mstdin and input arguments may not both be used.[39;49;00m[33m'[39;49;00m)[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstdin[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > [90m[39;49;00m > [94mif[39;49;00m capture_output:[90m[39;49;00m > [94mif[39;49;00m kwargs.get([33m'[39;49;00m[33mstdout[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m [95mor[39;49;00m kwargs.get([33m'[39;49;00m[33mstderr[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mraise[39;49;00m [96mValueError[39;49;00m([33m'[39;49;00m[33mstdout and stderr arguments may not be used [39;49;00m[33m'[39;49;00m[90m[39;49;00m > [33m'[39;49;00m[33mwith capture_output.[39;49;00m[33m'[39;49;00m)[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstdout[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstderr[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > [90m[39;49;00m >> [94mwith[39;49;00m Popen(*popenargs, **kwargs) [94mas[39;49;00m process:[90m[39;49;00m >[1m[31mE TypeError: 'tuple' object does not support the context manager protocol[0m > >capture_output = False >check = False >input = None >kwargs = {'stdout': -1} >popenargs = (('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > 'example_script.py'),) >timeout = None > >[1m[31m/usr/lib/python3.11/subprocess.py[0m:548: TypeError >[31m[1m________________________________________________________________________ test_universal_newlines[False] ________________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5ab2b46d0>, fake = False > > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [94mdef[39;49;00m [92mtest_universal_newlines[39;49;00m(fp, fake):[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=[33mb[39;49;00m[33m"[39;49;00m[33mStdout line 1[39;49;00m[33m\r[39;49;00m[33m\n[39;49;00m[33mStdout line 2[39;49;00m[33m\r[39;49;00m[33m\n[39;49;00m[33m"[39;49;00m,[90m[39;49;00m > )[90m[39;49;00m > process = subprocess.Popen([90m[39;49;00m > (PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m), universal_newlines=[94mTrue[39;49;00m, stdout=subprocess.PIPE[90m[39;49;00m > )[90m[39;49;00m >> process.wait()[90m[39;49;00m >[1m[31mE AttributeError: 'tuple' object has no attribute 'wait'[0m > >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5ab2b46d0> >process = (('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > 'example_script.py'), > (), > {'stdout': -1, 'universal_newlines': True}) > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:361: AttributeError >[31m[1m_______________________________________________________________________________ test_text[False] _______________________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5ab2b3910>, fake = False > > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [94mdef[39;49;00m [92mtest_text[39;49;00m(fp, fake):[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=[[33mb[39;49;00m[33m"[39;49;00m[33mStdout line 1[39;49;00m[33m"[39;49;00m, [33mb[39;49;00m[33m"[39;49;00m[33mStdout line 2[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > )[90m[39;49;00m > [94mif[39;49;00m sys.version_info < ([94m3[39;49;00m, [94m7[39;49;00m):[90m[39;49;00m > [94mwith[39;49;00m pytest.raises([96mTypeError[39;49;00m) [94mas[39;49;00m exc:[90m[39;49;00m > subprocess.Popen([90m[39;49;00m > (PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m), stdout=subprocess.PIPE, text=[94mTrue[39;49;00m[90m[39;49;00m > )[90m[39;49;00m > [94massert[39;49;00m [96mstr[39;49;00m(exc.value) == [33m"[39;49;00m[33m__init__() got an unexpected keyword argument [39;49;00m[33m'[39;49;00m[33mtext[39;49;00m[33m'[39;49;00m[33m"[39;49;00m[90m[39;49;00m > [94melse[39;49;00m:[90m[39;49;00m > process = subprocess.Popen([90m[39;49;00m > (PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m), stdout=subprocess.PIPE, text=[94mTrue[39;49;00m[90m[39;49;00m > )[90m[39;49;00m >> process.wait()[90m[39;49;00m >[1m[31mE AttributeError: 'tuple' object has no attribute 'wait'[0m > >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5ab2b3910> >process = (('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > 'example_script.py'), > (), > {'stdout': -1, 'text': True}) > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:384: AttributeError >[31m[1m______________________________________________________________________________ test_input[False] _______________________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5ab29c250>, fake = False > > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [94mdef[39;49;00m [92mtest_input[39;49;00m(fp, fake):[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > [90m[39;49;00m > [94mdef[39;49;00m [92mstdin_callable[39;49;00m([96minput[39;49;00m):[90m[39;49;00m > [94mreturn[39;49;00m {[90m[39;49;00m > [33m"[39;49;00m[33mstdout[39;49;00m[33m"[39;49;00m: [33m"[39;49;00m[33mProvide an input: Provided: [39;49;00m[33m{data}[39;49;00m[33m"[39;49;00m.format([90m[39;49;00m > data=[96minput[39;49;00m.decode()[90m[39;49;00m > )[90m[39;49;00m > }[90m[39;49;00m > [90m[39;49;00m > fp.register([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33minput[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=[[33mb[39;49;00m[33m"[39;49;00m[33mStdout line 1[39;49;00m[33m"[39;49;00m, [33mb[39;49;00m[33m"[39;49;00m[33mStdout line 2[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdin_callable=stdin_callable,[90m[39;49;00m > )[90m[39;49;00m > [90m[39;49;00m > process = subprocess.Popen([90m[39;49;00m > (PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33minput[39;49;00m[33m"[39;49;00m),[90m[39;49;00m > stdin=subprocess.PIPE,[90m[39;49;00m > stdout=subprocess.PIPE,[90m[39;49;00m > )[90m[39;49;00m >> out, err = process.communicate([96minput[39;49;00m=[33mb[39;49;00m[33m"[39;49;00m[33mtest[39;49;00m[33m"[39;49;00m)[90m[39;49;00m >[1m[31mE AttributeError: 'tuple' object has no attribute 'communicate'[0m > >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5ab29c250> >process = (('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > 'example_script.py', > 'input'), > (), > {'stdin': -1, 'stdout': -1}) > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:442: AttributeError >[31m[1m_________________________________________________________________________ test_ambiguous_input[False] __________________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5ab291710>, fake = False > > [37m@pytest[39;49;00m.mark.skipif([90m[39;49;00m > sys.version_info < ([94m3[39;49;00m, [94m7[39;49;00m),[90m[39;49;00m > reason=[33m"[39;49;00m[33mNo need to test since [39;49;00m[33m'[39;49;00m[33mtext[39;49;00m[33m'[39;49;00m[33m is available since 3.7[39;49;00m[33m"[39;49;00m,[90m[39;49;00m > )[90m[39;49;00m > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [94mdef[39;49;00m [92mtest_ambiguous_input[39;49;00m(fp, fake):[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([33m"[39;49;00m[33mtest[39;49;00m[33m"[39;49;00m, occurrences=[94m2[39;49;00m)[90m[39;49;00m > [90m[39;49;00m > [94mwith[39;49;00m pytest.raises(subprocess.SubprocessError) [94mas[39;49;00m exc:[90m[39;49;00m >> subprocess.run([33m"[39;49;00m[33mtest[39;49;00m[33m"[39;49;00m, universal_newlines=[94mFalse[39;49;00m, text=[94mTrue[39;49;00m)[90m[39;49;00m > >exc = <ExceptionInfo for raises contextmanager> >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5ab291710> > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:463: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >input = None, capture_output = False, timeout = None, check = False, popenargs = ('test',), kwargs = {'text': True, 'universal_newlines': False} > > [94mdef[39;49;00m [92mrun[39;49;00m(*popenargs,[90m[39;49;00m > [96minput[39;49;00m=[94mNone[39;49;00m, capture_output=[94mFalse[39;49;00m, timeout=[94mNone[39;49;00m, check=[94mFalse[39;49;00m, **kwargs):[90m[39;49;00m > [90m [39;49;00m[33m"""Run command with arguments and return a CompletedProcess instance.[39;49;00m > [33m[39;49;00m > [33m The returned instance will have attributes args, returncode, stdout and[39;49;00m > [33m stderr. By default, stdout and stderr are not captured, and those attributes[39;49;00m > [33m will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,[39;49;00m > [33m or pass capture_output=True to capture both.[39;49;00m > [33m[39;49;00m > [33m If check is True and the exit code was non-zero, it raises a[39;49;00m > [33m CalledProcessError. The CalledProcessError object will have the return code[39;49;00m > [33m in the returncode attribute, and output & stderr attributes if those streams[39;49;00m > [33m were captured.[39;49;00m > [33m[39;49;00m > [33m If timeout is given, and the process takes too long, a TimeoutExpired[39;49;00m > [33m exception will be raised.[39;49;00m > [33m[39;49;00m > [33m There is an optional argument "input", allowing you to[39;49;00m > [33m pass bytes or a string to the subprocess's stdin. If you use this argument[39;49;00m > [33m you may not also use the Popen constructor's "stdin" argument, as[39;49;00m > [33m it will be used internally.[39;49;00m > [33m[39;49;00m > [33m By default, all communication is in bytes, and therefore any "input" should[39;49;00m > [33m be bytes, and the stdout and stderr will be bytes. If in text mode, any[39;49;00m > [33m "input" should be a string, and stdout and stderr will be strings decoded[39;49;00m > [33m according to locale encoding, or by "encoding" if set. Text mode is[39;49;00m > [33m triggered by setting any of text, encoding, errors or universal_newlines.[39;49;00m > [33m[39;49;00m > [33m The other arguments are the same as for the Popen constructor.[39;49;00m > [33m """[39;49;00m[90m[39;49;00m > [94mif[39;49;00m [96minput[39;49;00m [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mif[39;49;00m kwargs.get([33m'[39;49;00m[33mstdin[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mraise[39;49;00m [96mValueError[39;49;00m([33m'[39;49;00m[33mstdin and input arguments may not both be used.[39;49;00m[33m'[39;49;00m)[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstdin[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > [90m[39;49;00m > [94mif[39;49;00m capture_output:[90m[39;49;00m > [94mif[39;49;00m kwargs.get([33m'[39;49;00m[33mstdout[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m [95mor[39;49;00m kwargs.get([33m'[39;49;00m[33mstderr[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mraise[39;49;00m [96mValueError[39;49;00m([33m'[39;49;00m[33mstdout and stderr arguments may not be used [39;49;00m[33m'[39;49;00m[90m[39;49;00m > [33m'[39;49;00m[33mwith capture_output.[39;49;00m[33m'[39;49;00m)[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstdout[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstderr[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > [90m[39;49;00m >> [94mwith[39;49;00m Popen(*popenargs, **kwargs) [94mas[39;49;00m process:[90m[39;49;00m >[1m[31mE TypeError: 'tuple' object does not support the context manager protocol[0m > >capture_output = False >check = False >input = None >kwargs = {'text': True, 'universal_newlines': False} >popenargs = ('test',) >timeout = None > >[1m[31m/usr/lib/python3.11/subprocess.py[0m:548: TypeError >[31m[1m__________________________________________________________________________ test_multiple_wait[False] ___________________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a5079b10>, fake = False > > [37m@pytest[39;49;00m.mark.flaky(reruns=[94m2[39;49;00m, condition=platform.python_implementation() == [33m"[39;49;00m[33mPyPy[39;49;00m[33m"[39;49;00m)[90m[39;49;00m > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [94mdef[39;49;00m [92mtest_multiple_wait[39;49;00m(fp, fake):[90m[39;49;00m > [90m [39;49;00m[33m"""[39;49;00m > [33m Wait multiple times for 0.2 seconds with process lasting for 0.5.[39;49;00m > [33m Third wait shall is a bit longer and will not raise an exception,[39;49;00m > [33m due to exceeding the subprocess runtime.[39;49;00m > [33m """[39;49;00m[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mwait[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > wait=[94m0.5[39;49;00m,[90m[39;49;00m > )[90m[39;49;00m > [90m[39;49;00m > process = subprocess.Popen([90m[39;49;00m > (PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mwait[39;49;00m[33m"[39;49;00m),[90m[39;49;00m > )[90m[39;49;00m > [94mwith[39;49;00m pytest.raises(subprocess.TimeoutExpired):[90m[39;49;00m >> process.wait(timeout=[94m0.2[39;49;00m)[90m[39;49;00m >[1m[31mE AttributeError: 'tuple' object has no attribute 'wait'[0m > >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a5079b10> >process = (('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > 'example_script.py', > 'wait'), > (), > {}) > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:500: AttributeError >[31m[1m________________________________________________________________________________ test_use_real _________________________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a427ced0> > > [94mdef[39;49;00m [92mtest_use_real[39;49;00m(fp):[90m[39;49;00m > fp.pass_command([PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m], occurrences=[94m3[39;49;00m)[90m[39;49;00m > fp.register([PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m], stdout=[[33m"[39;49;00m[33mFake line 1[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mFake line 2[39;49;00m[33m"[39;49;00m])[90m[39;49;00m > [90m[39;49;00m > [94mfor[39;49;00m _ [95min[39;49;00m [96mrange[39;49;00m([94m0[39;49;00m, [94m3[39;49;00m):[90m[39;49;00m >> [94massert[39;49;00m ([90m[39;49;00m > subprocess.check_output([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m], universal_newlines=[94mTrue[39;49;00m[90m[39;49;00m > )[90m[39;49;00m > == [33m"[39;49;00m[33mStdout line 1[39;49;00m[33m\n[39;49;00m[33mStdout line 2[39;49;00m[33m\n[39;49;00m[33m"[39;49;00m[90m[39;49;00m > )[90m[39;49;00m > >_ = 0 >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a427ced0> > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:724: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >[1m[31m/usr/lib/python3.11/subprocess.py[0m:466: in check_output > [94mreturn[39;49;00m run(*popenargs, stdout=PIPE, timeout=timeout, check=[94mTrue[39;49;00m,[90m[39;49;00m > kw = 'check' > kwargs = {'universal_newlines': True} > popenargs = (['/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > 'example_script.py'],) > timeout = None >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >input = None, capture_output = False, timeout = None, check = True >popenargs = (['/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', 'example_script.py'],) >kwargs = {'stdout': -1, 'universal_newlines': True} > > [94mdef[39;49;00m [92mrun[39;49;00m(*popenargs,[90m[39;49;00m > [96minput[39;49;00m=[94mNone[39;49;00m, capture_output=[94mFalse[39;49;00m, timeout=[94mNone[39;49;00m, check=[94mFalse[39;49;00m, **kwargs):[90m[39;49;00m > [90m [39;49;00m[33m"""Run command with arguments and return a CompletedProcess instance.[39;49;00m > [33m[39;49;00m > [33m The returned instance will have attributes args, returncode, stdout and[39;49;00m > [33m stderr. By default, stdout and stderr are not captured, and those attributes[39;49;00m > [33m will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,[39;49;00m > [33m or pass capture_output=True to capture both.[39;49;00m > [33m[39;49;00m > [33m If check is True and the exit code was non-zero, it raises a[39;49;00m > [33m CalledProcessError. The CalledProcessError object will have the return code[39;49;00m > [33m in the returncode attribute, and output & stderr attributes if those streams[39;49;00m > [33m were captured.[39;49;00m > [33m[39;49;00m > [33m If timeout is given, and the process takes too long, a TimeoutExpired[39;49;00m > [33m exception will be raised.[39;49;00m > [33m[39;49;00m > [33m There is an optional argument "input", allowing you to[39;49;00m > [33m pass bytes or a string to the subprocess's stdin. If you use this argument[39;49;00m > [33m you may not also use the Popen constructor's "stdin" argument, as[39;49;00m > [33m it will be used internally.[39;49;00m > [33m[39;49;00m > [33m By default, all communication is in bytes, and therefore any "input" should[39;49;00m > [33m be bytes, and the stdout and stderr will be bytes. If in text mode, any[39;49;00m > [33m "input" should be a string, and stdout and stderr will be strings decoded[39;49;00m > [33m according to locale encoding, or by "encoding" if set. Text mode is[39;49;00m > [33m triggered by setting any of text, encoding, errors or universal_newlines.[39;49;00m > [33m[39;49;00m > [33m The other arguments are the same as for the Popen constructor.[39;49;00m > [33m """[39;49;00m[90m[39;49;00m > [94mif[39;49;00m [96minput[39;49;00m [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mif[39;49;00m kwargs.get([33m'[39;49;00m[33mstdin[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mraise[39;49;00m [96mValueError[39;49;00m([33m'[39;49;00m[33mstdin and input arguments may not both be used.[39;49;00m[33m'[39;49;00m)[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstdin[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > [90m[39;49;00m > [94mif[39;49;00m capture_output:[90m[39;49;00m > [94mif[39;49;00m kwargs.get([33m'[39;49;00m[33mstdout[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m [95mor[39;49;00m kwargs.get([33m'[39;49;00m[33mstderr[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mraise[39;49;00m [96mValueError[39;49;00m([33m'[39;49;00m[33mstdout and stderr arguments may not be used [39;49;00m[33m'[39;49;00m[90m[39;49;00m > [33m'[39;49;00m[33mwith capture_output.[39;49;00m[33m'[39;49;00m)[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstdout[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstderr[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > [90m[39;49;00m >> [94mwith[39;49;00m Popen(*popenargs, **kwargs) [94mas[39;49;00m process:[90m[39;49;00m >[1m[31mE TypeError: 'tuple' object does not support the context manager protocol[0m > >capture_output = False >check = True >input = None >kwargs = {'stdout': -1, 'universal_newlines': True} >popenargs = (['/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > 'example_script.py'],) >timeout = None > >[1m[31m/usr/lib/python3.11/subprocess.py[0m:548: TypeError >[31m[1m______________________________________________________________________________ test_real_process _______________________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd59f501350> > > [37m@pytest[39;49;00m.mark.skipif(os.name == [33m"[39;49;00m[33mnt[39;49;00m[33m"[39;49;00m, reason=[33m"[39;49;00m[33mSkip on windows[39;49;00m[33m"[39;49;00m)[90m[39;49;00m > [94mdef[39;49;00m [92mtest_real_process[39;49;00m(fp):[90m[39;49;00m > [94mwith[39;49;00m pytest.raises(fp.exceptions.ProcessNotRegisteredError):[90m[39;49;00m > [90m# this will fail, as "ls" command is not registered[39;49;00m[90m[39;49;00m > subprocess.call([33m"[39;49;00m[33mls[39;49;00m[33m"[39;49;00m)[90m[39;49;00m > [90m[39;49;00m > fp.pass_command([33m"[39;49;00m[33mls[39;49;00m[33m"[39;49;00m)[90m[39;49;00m > [90m# now it should be fine[39;49;00m[90m[39;49;00m >> [94massert[39;49;00m subprocess.call([33m"[39;49;00m[33mls[39;49;00m[33m"[39;49;00m) == [94m0[39;49;00m[90m[39;49;00m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd59f501350> > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:744: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >timeout = None, popenargs = ('ls',), kwargs = {} > > [94mdef[39;49;00m [92mcall[39;49;00m(*popenargs, timeout=[94mNone[39;49;00m, **kwargs):[90m[39;49;00m > [90m [39;49;00m[33m"""Run command with arguments. Wait for command to complete or[39;49;00m > [33m timeout, then return the returncode attribute.[39;49;00m > [33m[39;49;00m > [33m The arguments are the same as for the Popen constructor. Example:[39;49;00m > [33m[39;49;00m > [33m retcode = call(["ls", "-l"])[39;49;00m > [33m """[39;49;00m[90m[39;49;00m >> [94mwith[39;49;00m Popen(*popenargs, **kwargs) [94mas[39;49;00m p:[90m[39;49;00m >[1m[31mE TypeError: 'tuple' object does not support the context manager protocol[0m > >kwargs = {} >popenargs = ('ls',) >timeout = None > >[1m[31m/usr/lib/python3.11/subprocess.py[0m:389: TypeError >[31m[1m________________________________________________________________________ test_encoding[False-encoding] _________________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd59dbad890>, fake = False, argument = 'encoding' > > [37m@pytest[39;49;00m.mark.skipif([90m[39;49;00m > sys.version_info <= ([94m3[39;49;00m, [94m6[39;49;00m),[90m[39;49;00m > reason=[33m"[39;49;00m[33mencoding and errors has been introduced in 3.6[39;49;00m[33m"[39;49;00m,[90m[39;49;00m > )[90m[39;49;00m > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33margument[39;49;00m[33m"[39;49;00m, [[33m"[39;49;00m[33mencoding[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33merrors[39;49;00m[33m"[39;49;00m])[90m[39;49;00m > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [94mdef[39;49;00m [92mtest_encoding[39;49;00m(fp, fake, argument):[90m[39;49;00m > [90m [39;49;00m[33m"""If encoding or errors is provided, the `text=True` behavior should be enabled."""[39;49;00m[90m[39;49;00m > username = getpass.getuser()[90m[39;49;00m > values = {[33m"[39;49;00m[33mencoding[39;49;00m[33m"[39;49;00m: [33m"[39;49;00m[33mutf-8[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33merrors[39;49;00m[33m"[39;49;00m: [33m"[39;49;00m[33mstrict[39;49;00m[33m"[39;49;00m}[90m[39;49;00m > [90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([[33m"[39;49;00m[33mwhoami[39;49;00m[33m"[39;49;00m], stdout=username)[90m[39;49;00m > [90m[39;49;00m >> output = subprocess.check_output([90m[39;49;00m > [[33m"[39;49;00m[33mwhoami[39;49;00m[33m"[39;49;00m], **{argument: values.get(argument)}[90m[39;49;00m > ).strip()[90m[39;49;00m > >argument = 'encoding' >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd59dbad890> >username = 'kingjon' >values = {'encoding': 'utf-8', 'errors': 'strict'} > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:925: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >[1m[31m/usr/lib/python3.11/subprocess.py[0m:466: in check_output > [94mreturn[39;49;00m run(*popenargs, stdout=PIPE, timeout=timeout, check=[94mTrue[39;49;00m,[90m[39;49;00m > kw = 'check' > kwargs = {'encoding': 'utf-8'} > popenargs = (['whoami'],) > timeout = None >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >input = None, capture_output = False, timeout = None, check = True, popenargs = (['whoami'],), kwargs = {'encoding': 'utf-8', 'stdout': -1} > > [94mdef[39;49;00m [92mrun[39;49;00m(*popenargs,[90m[39;49;00m > [96minput[39;49;00m=[94mNone[39;49;00m, capture_output=[94mFalse[39;49;00m, timeout=[94mNone[39;49;00m, check=[94mFalse[39;49;00m, **kwargs):[90m[39;49;00m > [90m [39;49;00m[33m"""Run command with arguments and return a CompletedProcess instance.[39;49;00m > [33m[39;49;00m > [33m The returned instance will have attributes args, returncode, stdout and[39;49;00m > [33m stderr. By default, stdout and stderr are not captured, and those attributes[39;49;00m > [33m will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,[39;49;00m > [33m or pass capture_output=True to capture both.[39;49;00m > [33m[39;49;00m > [33m If check is True and the exit code was non-zero, it raises a[39;49;00m > [33m CalledProcessError. The CalledProcessError object will have the return code[39;49;00m > [33m in the returncode attribute, and output & stderr attributes if those streams[39;49;00m > [33m were captured.[39;49;00m > [33m[39;49;00m > [33m If timeout is given, and the process takes too long, a TimeoutExpired[39;49;00m > [33m exception will be raised.[39;49;00m > [33m[39;49;00m > [33m There is an optional argument "input", allowing you to[39;49;00m > [33m pass bytes or a string to the subprocess's stdin. If you use this argument[39;49;00m > [33m you may not also use the Popen constructor's "stdin" argument, as[39;49;00m > [33m it will be used internally.[39;49;00m > [33m[39;49;00m > [33m By default, all communication is in bytes, and therefore any "input" should[39;49;00m > [33m be bytes, and the stdout and stderr will be bytes. If in text mode, any[39;49;00m > [33m "input" should be a string, and stdout and stderr will be strings decoded[39;49;00m > [33m according to locale encoding, or by "encoding" if set. Text mode is[39;49;00m > [33m triggered by setting any of text, encoding, errors or universal_newlines.[39;49;00m > [33m[39;49;00m > [33m The other arguments are the same as for the Popen constructor.[39;49;00m > [33m """[39;49;00m[90m[39;49;00m > [94mif[39;49;00m [96minput[39;49;00m [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mif[39;49;00m kwargs.get([33m'[39;49;00m[33mstdin[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mraise[39;49;00m [96mValueError[39;49;00m([33m'[39;49;00m[33mstdin and input arguments may not both be used.[39;49;00m[33m'[39;49;00m)[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstdin[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > [90m[39;49;00m > [94mif[39;49;00m capture_output:[90m[39;49;00m > [94mif[39;49;00m kwargs.get([33m'[39;49;00m[33mstdout[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m [95mor[39;49;00m kwargs.get([33m'[39;49;00m[33mstderr[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mraise[39;49;00m [96mValueError[39;49;00m([33m'[39;49;00m[33mstdout and stderr arguments may not be used [39;49;00m[33m'[39;49;00m[90m[39;49;00m > [33m'[39;49;00m[33mwith capture_output.[39;49;00m[33m'[39;49;00m)[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstdout[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstderr[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > [90m[39;49;00m >> [94mwith[39;49;00m Popen(*popenargs, **kwargs) [94mas[39;49;00m process:[90m[39;49;00m >[1m[31mE TypeError: 'tuple' object does not support the context manager protocol[0m > >capture_output = False >check = True >input = None >kwargs = {'encoding': 'utf-8', 'stdout': -1} >popenargs = (['whoami'],) >timeout = None > >[1m[31m/usr/lib/python3.11/subprocess.py[0m:548: TypeError >[31m[1m_________________________________________________________________________ test_encoding[False-errors] __________________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd59dcdb590>, fake = False, argument = 'errors' > > [37m@pytest[39;49;00m.mark.skipif([90m[39;49;00m > sys.version_info <= ([94m3[39;49;00m, [94m6[39;49;00m),[90m[39;49;00m > reason=[33m"[39;49;00m[33mencoding and errors has been introduced in 3.6[39;49;00m[33m"[39;49;00m,[90m[39;49;00m > )[90m[39;49;00m > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33margument[39;49;00m[33m"[39;49;00m, [[33m"[39;49;00m[33mencoding[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33merrors[39;49;00m[33m"[39;49;00m])[90m[39;49;00m > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [94mdef[39;49;00m [92mtest_encoding[39;49;00m(fp, fake, argument):[90m[39;49;00m > [90m [39;49;00m[33m"""If encoding or errors is provided, the `text=True` behavior should be enabled."""[39;49;00m[90m[39;49;00m > username = getpass.getuser()[90m[39;49;00m > values = {[33m"[39;49;00m[33mencoding[39;49;00m[33m"[39;49;00m: [33m"[39;49;00m[33mutf-8[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33merrors[39;49;00m[33m"[39;49;00m: [33m"[39;49;00m[33mstrict[39;49;00m[33m"[39;49;00m}[90m[39;49;00m > [90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([[33m"[39;49;00m[33mwhoami[39;49;00m[33m"[39;49;00m], stdout=username)[90m[39;49;00m > [90m[39;49;00m >> output = subprocess.check_output([90m[39;49;00m > [[33m"[39;49;00m[33mwhoami[39;49;00m[33m"[39;49;00m], **{argument: values.get(argument)}[90m[39;49;00m > ).strip()[90m[39;49;00m > >argument = 'errors' >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd59dcdb590> >username = 'kingjon' >values = {'encoding': 'utf-8', 'errors': 'strict'} > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:925: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >[1m[31m/usr/lib/python3.11/subprocess.py[0m:466: in check_output > [94mreturn[39;49;00m run(*popenargs, stdout=PIPE, timeout=timeout, check=[94mTrue[39;49;00m,[90m[39;49;00m > kw = 'check' > kwargs = {'errors': 'strict'} > popenargs = (['whoami'],) > timeout = None >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >input = None, capture_output = False, timeout = None, check = True, popenargs = (['whoami'],), kwargs = {'errors': 'strict', 'stdout': -1} > > [94mdef[39;49;00m [92mrun[39;49;00m(*popenargs,[90m[39;49;00m > [96minput[39;49;00m=[94mNone[39;49;00m, capture_output=[94mFalse[39;49;00m, timeout=[94mNone[39;49;00m, check=[94mFalse[39;49;00m, **kwargs):[90m[39;49;00m > [90m [39;49;00m[33m"""Run command with arguments and return a CompletedProcess instance.[39;49;00m > [33m[39;49;00m > [33m The returned instance will have attributes args, returncode, stdout and[39;49;00m > [33m stderr. By default, stdout and stderr are not captured, and those attributes[39;49;00m > [33m will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,[39;49;00m > [33m or pass capture_output=True to capture both.[39;49;00m > [33m[39;49;00m > [33m If check is True and the exit code was non-zero, it raises a[39;49;00m > [33m CalledProcessError. The CalledProcessError object will have the return code[39;49;00m > [33m in the returncode attribute, and output & stderr attributes if those streams[39;49;00m > [33m were captured.[39;49;00m > [33m[39;49;00m > [33m If timeout is given, and the process takes too long, a TimeoutExpired[39;49;00m > [33m exception will be raised.[39;49;00m > [33m[39;49;00m > [33m There is an optional argument "input", allowing you to[39;49;00m > [33m pass bytes or a string to the subprocess's stdin. If you use this argument[39;49;00m > [33m you may not also use the Popen constructor's "stdin" argument, as[39;49;00m > [33m it will be used internally.[39;49;00m > [33m[39;49;00m > [33m By default, all communication is in bytes, and therefore any "input" should[39;49;00m > [33m be bytes, and the stdout and stderr will be bytes. If in text mode, any[39;49;00m > [33m "input" should be a string, and stdout and stderr will be strings decoded[39;49;00m > [33m according to locale encoding, or by "encoding" if set. Text mode is[39;49;00m > [33m triggered by setting any of text, encoding, errors or universal_newlines.[39;49;00m > [33m[39;49;00m > [33m The other arguments are the same as for the Popen constructor.[39;49;00m > [33m """[39;49;00m[90m[39;49;00m > [94mif[39;49;00m [96minput[39;49;00m [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mif[39;49;00m kwargs.get([33m'[39;49;00m[33mstdin[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mraise[39;49;00m [96mValueError[39;49;00m([33m'[39;49;00m[33mstdin and input arguments may not both be used.[39;49;00m[33m'[39;49;00m)[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstdin[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > [90m[39;49;00m > [94mif[39;49;00m capture_output:[90m[39;49;00m > [94mif[39;49;00m kwargs.get([33m'[39;49;00m[33mstdout[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m [95mor[39;49;00m kwargs.get([33m'[39;49;00m[33mstderr[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mraise[39;49;00m [96mValueError[39;49;00m([33m'[39;49;00m[33mstdout and stderr arguments may not be used [39;49;00m[33m'[39;49;00m[90m[39;49;00m > [33m'[39;49;00m[33mwith capture_output.[39;49;00m[33m'[39;49;00m)[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstdout[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstderr[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > [90m[39;49;00m >> [94mwith[39;49;00m Popen(*popenargs, **kwargs) [94mas[39;49;00m process:[90m[39;49;00m >[1m[31mE TypeError: 'tuple' object does not support the context manager protocol[0m > >capture_output = False >check = True >input = None >kwargs = {'errors': 'strict', 'stdout': -1} >popenargs = (['whoami'],) >timeout = None > >[1m[31m/usr/lib/python3.11/subprocess.py[0m:548: TypeError >[31m[1m_______________________________________________________________________ test_allow_unregistered_cleaning _______________________________________________________________________[0m > >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd59dcdd610> > > [94mdef[39;49;00m [92mtest_allow_unregistered_cleaning[39;49;00m(fp):[90m[39;49;00m > [90m [39;49;00m[33m"""[39;49;00m > [33m GitHub: #46.[39;49;00m > [33m The `allow_unregistered()` function should affect only the level where it was applied[39;49;00m > [33m The setting shouldn't leak to a higher levels or other tests.[39;49;00m > [33m """[39;49;00m[90m[39;49;00m > fp.allow_unregistered([94mFalse[39;49;00m)[90m[39;49;00m > [90m[39;49;00m > [94mwith[39;49;00m fp.context() [94mas[39;49;00m context:[90m[39;49;00m > context.allow_unregistered([94mTrue[39;49;00m)[90m[39;49;00m > [90m[39;49;00m >> subprocess.run([PYTHON, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m])[90m[39;49;00m > >context = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd59dcde110> >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd59dcdd610> > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:1052: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >input = None, capture_output = False, timeout = None, check = False >popenargs = (['/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', 'example_script.py'],), kwargs = {} > > [94mdef[39;49;00m [92mrun[39;49;00m(*popenargs,[90m[39;49;00m > [96minput[39;49;00m=[94mNone[39;49;00m, capture_output=[94mFalse[39;49;00m, timeout=[94mNone[39;49;00m, check=[94mFalse[39;49;00m, **kwargs):[90m[39;49;00m > [90m [39;49;00m[33m"""Run command with arguments and return a CompletedProcess instance.[39;49;00m > [33m[39;49;00m > [33m The returned instance will have attributes args, returncode, stdout and[39;49;00m > [33m stderr. By default, stdout and stderr are not captured, and those attributes[39;49;00m > [33m will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,[39;49;00m > [33m or pass capture_output=True to capture both.[39;49;00m > [33m[39;49;00m > [33m If check is True and the exit code was non-zero, it raises a[39;49;00m > [33m CalledProcessError. The CalledProcessError object will have the return code[39;49;00m > [33m in the returncode attribute, and output & stderr attributes if those streams[39;49;00m > [33m were captured.[39;49;00m > [33m[39;49;00m > [33m If timeout is given, and the process takes too long, a TimeoutExpired[39;49;00m > [33m exception will be raised.[39;49;00m > [33m[39;49;00m > [33m There is an optional argument "input", allowing you to[39;49;00m > [33m pass bytes or a string to the subprocess's stdin. If you use this argument[39;49;00m > [33m you may not also use the Popen constructor's "stdin" argument, as[39;49;00m > [33m it will be used internally.[39;49;00m > [33m[39;49;00m > [33m By default, all communication is in bytes, and therefore any "input" should[39;49;00m > [33m be bytes, and the stdout and stderr will be bytes. If in text mode, any[39;49;00m > [33m "input" should be a string, and stdout and stderr will be strings decoded[39;49;00m > [33m according to locale encoding, or by "encoding" if set. Text mode is[39;49;00m > [33m triggered by setting any of text, encoding, errors or universal_newlines.[39;49;00m > [33m[39;49;00m > [33m The other arguments are the same as for the Popen constructor.[39;49;00m > [33m """[39;49;00m[90m[39;49;00m > [94mif[39;49;00m [96minput[39;49;00m [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mif[39;49;00m kwargs.get([33m'[39;49;00m[33mstdin[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mraise[39;49;00m [96mValueError[39;49;00m([33m'[39;49;00m[33mstdin and input arguments may not both be used.[39;49;00m[33m'[39;49;00m)[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstdin[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > [90m[39;49;00m > [94mif[39;49;00m capture_output:[90m[39;49;00m > [94mif[39;49;00m kwargs.get([33m'[39;49;00m[33mstdout[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m [95mor[39;49;00m kwargs.get([33m'[39;49;00m[33mstderr[39;49;00m[33m'[39;49;00m) [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m > [94mraise[39;49;00m [96mValueError[39;49;00m([33m'[39;49;00m[33mstdout and stderr arguments may not be used [39;49;00m[33m'[39;49;00m[90m[39;49;00m > [33m'[39;49;00m[33mwith capture_output.[39;49;00m[33m'[39;49;00m)[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstdout[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > kwargs[[33m'[39;49;00m[33mstderr[39;49;00m[33m'[39;49;00m] = PIPE[90m[39;49;00m > [90m[39;49;00m >> [94mwith[39;49;00m Popen(*popenargs, **kwargs) [94mas[39;49;00m process:[90m[39;49;00m >[1m[31mE TypeError: 'tuple' object does not support the context manager protocol[0m > >capture_output = False >check = False >input = None >kwargs = {} >popenargs = (['/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > 'example_script.py'],) >timeout = None > >[1m[31m/usr/lib/python3.11/subprocess.py[0m:548: TypeError >[31m[1m______________________________________________________________________ test_non_piped_streams[True-False] ______________________________________________________________________[0m > >tmpdir = local('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_streams_True_Fa0') >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5ab2b6290>, fake = False, bytes = True > > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mbytes[39;49;00m[33m"[39;49;00m, [[94mTrue[39;49;00m, [94mFalse[39;49;00m])[90m[39;49;00m > [94mdef[39;49;00m [92mtest_non_piped_streams[39;49;00m(tmpdir, fp, fake, [96mbytes[39;49;00m):[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33m-u[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mstderr[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=[[33m"[39;49;00m[33mStdout line 1[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mStdout line 2[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stderr=[[33m"[39;49;00m[33mStderr line 1[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > )[90m[39;49;00m > [90m[39;49;00m > stdout_path = tmpdir.join([33m"[39;49;00m[33mstdout[39;49;00m[33m"[39;49;00m)[90m[39;49;00m > stderr_path = tmpdir.join([33m"[39;49;00m[33mstderr[39;49;00m[33m"[39;49;00m)[90m[39;49;00m > [90m[39;49;00m > mode = [33m"[39;49;00m[33mwb[39;49;00m[33m"[39;49;00m [94mif[39;49;00m [96mbytes[39;49;00m [94melse[39;49;00m [33m"[39;49;00m[33mw[39;49;00m[33m"[39;49;00m[90m[39;49;00m > [90m[39;49;00m > [94mwith[39;49;00m [96mopen[39;49;00m(stdout_path, mode) [94mas[39;49;00m stdout, [96mopen[39;49;00m(stderr_path, mode) [94mas[39;49;00m stderr:[90m[39;49;00m > process = subprocess.Popen([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33m-u[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mstderr[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=stdout,[90m[39;49;00m > stderr=stderr,[90m[39;49;00m > )[90m[39;49;00m > [90m[39;49;00m >> err, out = process.communicate()[90m[39;49;00m >[1m[31mE AttributeError: 'tuple' object has no attribute 'communicate'[0m > >bytes = True >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5ab2b6290> >mode = 'wb' >process = (['/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > '-u', > 'example_script.py', > 'stderr'], > (), > {'stderr': <_io.BufferedWriter name='/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_streams_True_Fa0/stderr'>, > 'stdout': <_io.BufferedWriter name='/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_streams_True_Fa0/stdout'>}) >stderr = <_io.BufferedWriter name='/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_streams_True_Fa0/stderr'> >stderr_path = local('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_streams_True_Fa0/stderr') >stdout = <_io.BufferedWriter name='/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_streams_True_Fa0/stdout'> >stdout_path = local('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_streams_True_Fa0/stdout') >tmpdir = local('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_streams_True_Fa0') > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:1161: AttributeError >[31m[1m_____________________________________________________________________ test_non_piped_streams[False-False] ______________________________________________________________________[0m > >tmpdir = local('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_streams_False_F0') >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd59db92750>, fake = False, bytes = False > > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mbytes[39;49;00m[33m"[39;49;00m, [[94mTrue[39;49;00m, [94mFalse[39;49;00m])[90m[39;49;00m > [94mdef[39;49;00m [92mtest_non_piped_streams[39;49;00m(tmpdir, fp, fake, [96mbytes[39;49;00m):[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33m-u[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mstderr[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=[[33m"[39;49;00m[33mStdout line 1[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mStdout line 2[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stderr=[[33m"[39;49;00m[33mStderr line 1[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > )[90m[39;49;00m > [90m[39;49;00m > stdout_path = tmpdir.join([33m"[39;49;00m[33mstdout[39;49;00m[33m"[39;49;00m)[90m[39;49;00m > stderr_path = tmpdir.join([33m"[39;49;00m[33mstderr[39;49;00m[33m"[39;49;00m)[90m[39;49;00m > [90m[39;49;00m > mode = [33m"[39;49;00m[33mwb[39;49;00m[33m"[39;49;00m [94mif[39;49;00m [96mbytes[39;49;00m [94melse[39;49;00m [33m"[39;49;00m[33mw[39;49;00m[33m"[39;49;00m[90m[39;49;00m > [90m[39;49;00m > [94mwith[39;49;00m [96mopen[39;49;00m(stdout_path, mode) [94mas[39;49;00m stdout, [96mopen[39;49;00m(stderr_path, mode) [94mas[39;49;00m stderr:[90m[39;49;00m > process = subprocess.Popen([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33m-u[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mstderr[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=stdout,[90m[39;49;00m > stderr=stderr,[90m[39;49;00m > )[90m[39;49;00m > [90m[39;49;00m >> err, out = process.communicate()[90m[39;49;00m >[1m[31mE AttributeError: 'tuple' object has no attribute 'communicate'[0m > >bytes = False >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd59db92750> >mode = 'w' >process = (['/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > '-u', > 'example_script.py', > 'stderr'], > (), > {'stderr': <_io.TextIOWrapper name='/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_streams_False_F0/stderr' mode='w' encoding='UTF-8'>, > 'stdout': <_io.TextIOWrapper name='/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_streams_False_F0/stdout' mode='w' encoding='UTF-8'>}) >stderr = <_io.TextIOWrapper name='/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_streams_False_F0/stderr' mode='w' encoding='UTF-8'> >stderr_path = local('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_streams_False_F0/stderr') >stdout = <_io.TextIOWrapper name='/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_streams_False_F0/stdout' mode='w' encoding='UTF-8'> >stdout_path = local('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_streams_False_F0/stdout') >tmpdir = local('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_streams_False_F0') > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:1161: AttributeError >[31m[1m_____________________________________________________________________ test_non_piped_same_file[True-False] _____________________________________________________________________[0m > >tmpdir = local('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_same_file_True_0') >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a43f1210>, fake = False, bytes = True > > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mbytes[39;49;00m[33m"[39;49;00m, [[94mTrue[39;49;00m, [94mFalse[39;49;00m])[90m[39;49;00m > [94mdef[39;49;00m [92mtest_non_piped_same_file[39;49;00m(tmpdir, fp, fake, [96mbytes[39;49;00m):[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33m-u[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mstderr[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=[[33m"[39;49;00m[33mStdout line 1[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mStdout line 2[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stderr=[33m"[39;49;00m[33mStderr line 1[39;49;00m[33m\n[39;49;00m[33m"[39;49;00m,[90m[39;49;00m > )[90m[39;49;00m > [90m[39;49;00m > output_path = tmpdir.join([33m"[39;49;00m[33moutput[39;49;00m[33m"[39;49;00m)[90m[39;49;00m > [90m[39;49;00m > mode = [33m"[39;49;00m[33mwb[39;49;00m[33m"[39;49;00m [94mif[39;49;00m [96mbytes[39;49;00m [94melse[39;49;00m [33m"[39;49;00m[33mw[39;49;00m[33m"[39;49;00m[90m[39;49;00m > [90m[39;49;00m > [94mwith[39;49;00m [96mopen[39;49;00m(output_path, mode) [94mas[39;49;00m out_file:[90m[39;49;00m > process = subprocess.Popen([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33m-u[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mstderr[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=out_file,[90m[39;49;00m > stderr=out_file,[90m[39;49;00m > )[90m[39;49;00m > [90m[39;49;00m >> err, out = process.communicate()[90m[39;49;00m >[1m[31mE AttributeError: 'tuple' object has no attribute 'communicate'[0m > >bytes = True >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd5a43f1210> >mode = 'wb' >out_file = <_io.BufferedWriter name='/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_same_file_True_0/output'> >output_path = local('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_same_file_True_0/output') >process = (['/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > '-u', > 'example_script.py', > 'stderr'], > (), > {'stderr': <_io.BufferedWriter name='/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_same_file_True_0/output'>, > 'stdout': <_io.BufferedWriter name='/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_same_file_True_0/output'>}) >tmpdir = local('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_same_file_True_0') > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:1196: AttributeError >[31m[1m____________________________________________________________________ test_non_piped_same_file[False-False] _____________________________________________________________________[0m > >tmpdir = local('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_same_file_False0') >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd59dc1e590>, fake = False, bytes = False > > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mfake[39;49;00m[33m"[39;49;00m, [[94mFalse[39;49;00m, [94mTrue[39;49;00m])[90m[39;49;00m > [37m@pytest[39;49;00m.mark.parametrize([33m"[39;49;00m[33mbytes[39;49;00m[33m"[39;49;00m, [[94mTrue[39;49;00m, [94mFalse[39;49;00m])[90m[39;49;00m > [94mdef[39;49;00m [92mtest_non_piped_same_file[39;49;00m(tmpdir, fp, fake, [96mbytes[39;49;00m):[90m[39;49;00m > fp.allow_unregistered([95mnot[39;49;00m fake)[90m[39;49;00m > [94mif[39;49;00m fake:[90m[39;49;00m > fp.register([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33m-u[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mstderr[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=[[33m"[39;49;00m[33mStdout line 1[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mStdout line 2[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stderr=[33m"[39;49;00m[33mStderr line 1[39;49;00m[33m\n[39;49;00m[33m"[39;49;00m,[90m[39;49;00m > )[90m[39;49;00m > [90m[39;49;00m > output_path = tmpdir.join([33m"[39;49;00m[33moutput[39;49;00m[33m"[39;49;00m)[90m[39;49;00m > [90m[39;49;00m > mode = [33m"[39;49;00m[33mwb[39;49;00m[33m"[39;49;00m [94mif[39;49;00m [96mbytes[39;49;00m [94melse[39;49;00m [33m"[39;49;00m[33mw[39;49;00m[33m"[39;49;00m[90m[39;49;00m > [90m[39;49;00m > [94mwith[39;49;00m [96mopen[39;49;00m(output_path, mode) [94mas[39;49;00m out_file:[90m[39;49;00m > process = subprocess.Popen([90m[39;49;00m > [PYTHON, [33m"[39;49;00m[33m-u[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mexample_script.py[39;49;00m[33m"[39;49;00m, [33m"[39;49;00m[33mstderr[39;49;00m[33m"[39;49;00m],[90m[39;49;00m > stdout=out_file,[90m[39;49;00m > stderr=out_file,[90m[39;49;00m > )[90m[39;49;00m > [90m[39;49;00m >> err, out = process.communicate()[90m[39;49;00m >[1m[31mE AttributeError: 'tuple' object has no attribute 'communicate'[0m > >bytes = False >fake = False >fp = <pytest_subprocess.fake_process.FakeProcess object at 0x7fd59dc1e590> >mode = 'w' >out_file = <_io.TextIOWrapper name='/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_same_file_False0/output' mode='w' encoding='UTF-8'> >output_path = local('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_same_file_False0/output') >process = (['/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0-python3_11/install/usr/bin/python3.11', > '-u', > 'example_script.py', > 'stderr'], > (), > {'stderr': <_io.TextIOWrapper name='/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_same_file_False0/output' mode='w' encoding='UTF-8'>, > 'stdout': <_io.TextIOWrapper name='/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_same_file_False0/output' mode='w' encoding='UTF-8'>}) >tmpdir = local('/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/pytest-of-kingjon/pytest-0/test_non_piped_same_file_False0') > >[1m[31m/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_subprocess.py[0m:1196: AttributeError >[33m=============================================================================== warnings summary ===============================================================================[0m >tests/test_asyncio.py: 23 warnings > /usr/lib/python3.11/site-packages/pytest_asyncio/plugin.py:759: DeprecationWarning: The event_loop fixture provided by pytest-asyncio has been redefined in > /var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0/tests/test_asyncio.py:14 > Replacing the event_loop fixture with a custom implementation is deprecated > and will lead to errors in the future. > If you want to request an asyncio event loop with a scope other than function > scope, use the "scope" argument to the asyncio mark when marking the tests. > If you want to return different types of event loops, use the event_loop_policy > fixture. > > warnings.warn( > >tests/test_examples.py::test_documentation[docs/index.rst] >tests/test_examples.py::test_documentation[README.rst] > /usr/lib/python3.11/site-packages/pytest_tornado/plugin.py:70: PytestDeprecationWarning: The hookimpl pytest_pycollect_makeitem uses old-style configuration options (marks or attributes). > Please use the pytest.hookimpl(tryfirst=True) decorator instead > to configure the hooks. > See https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers > @pytest.mark.tryfirst > >tests/test_examples.py::test_documentation[docs/index.rst] >tests/test_examples.py::test_documentation[README.rst] > /usr/lib/python3.11/site-packages/pytest_tornado/plugin.py:87: PytestDeprecationWarning: The hookimpl pytest_pyfunc_call uses old-style configuration options (marks or attributes). > Please use the pytest.hookimpl(tryfirst=True) decorator instead > to configure the hooks. > See https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers > @pytest.mark.tryfirst > >-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html >[36m[1m=========================================================================== short test summary info ============================================================================[0m >[33mSKIPPED[0m [4] tests/test_asyncio.py:114: condition: sys.platform!="win32" >[31mFAILED[0m tests/test_subprocess.py::[1mtest_basic_process[str-False][0m - AttributeError: 'tuple' object has no attribute 'communicate' >[31mFAILED[0m tests/test_subprocess.py::[1mtest_basic_process[path,str-False][0m - AttributeError: 'tuple' object has no attribute 'communicate' >[31mFAILED[0m tests/test_subprocess.py::[1mtest_basic_process[str,path-False][0m - AttributeError: 'tuple' object has no attribute 'communicate' >[31mFAILED[0m tests/test_subprocess.py::[1mtest_basic_process[path-False][0m - AttributeError: 'tuple' object has no attribute 'communicate' >[31mFAILED[0m tests/test_subprocess.py::[1mtest_basic_process_merge_streams[False][0m - AttributeError: 'tuple' object has no attribute 'communicate' >[31mFAILED[0m tests/test_subprocess.py::[1mtest_wait[False][0m - AttributeError: 'tuple' object has no attribute 'returncode' >[31mFAILED[0m tests/test_subprocess.py::[1mtest_check_output[False][0m - TypeError: 'tuple' object does not support the context manager protocol >[31mFAILED[0m tests/test_subprocess.py::[1mtest_check_call[False][0m - TypeError: 'tuple' object does not support the context manager protocol >[31mFAILED[0m tests/test_subprocess.py::[1mtest_call[False][0m - TypeError: 'tuple' object does not support the context manager protocol >[31mFAILED[0m tests/test_subprocess.py::[1mtest_run[False][0m - TypeError: 'tuple' object does not support the context manager protocol >[31mFAILED[0m tests/test_subprocess.py::[1mtest_universal_newlines[False][0m - AttributeError: 'tuple' object has no attribute 'wait' >[31mFAILED[0m tests/test_subprocess.py::[1mtest_text[False][0m - AttributeError: 'tuple' object has no attribute 'wait' >[31mFAILED[0m tests/test_subprocess.py::[1mtest_input[False][0m - AttributeError: 'tuple' object has no attribute 'communicate' >[31mFAILED[0m tests/test_subprocess.py::[1mtest_ambiguous_input[False][0m - TypeError: 'tuple' object does not support the context manager protocol >[31mFAILED[0m tests/test_subprocess.py::[1mtest_multiple_wait[False][0m - AttributeError: 'tuple' object has no attribute 'wait' >[31mFAILED[0m tests/test_subprocess.py::[1mtest_use_real[0m - TypeError: 'tuple' object does not support the context manager protocol >[31mFAILED[0m tests/test_subprocess.py::[1mtest_real_process[0m - TypeError: 'tuple' object does not support the context manager protocol >[31mFAILED[0m tests/test_subprocess.py::[1mtest_encoding[False-encoding][0m - TypeError: 'tuple' object does not support the context manager protocol >[31mFAILED[0m tests/test_subprocess.py::[1mtest_encoding[False-errors][0m - TypeError: 'tuple' object does not support the context manager protocol >[31mFAILED[0m tests/test_subprocess.py::[1mtest_allow_unregistered_cleaning[0m - TypeError: 'tuple' object does not support the context manager protocol >[31mFAILED[0m tests/test_subprocess.py::[1mtest_non_piped_streams[True-False][0m - AttributeError: 'tuple' object has no attribute 'communicate' >[31mFAILED[0m tests/test_subprocess.py::[1mtest_non_piped_streams[False-False][0m - AttributeError: 'tuple' object has no attribute 'communicate' >[31mFAILED[0m tests/test_subprocess.py::[1mtest_non_piped_same_file[True-False][0m - AttributeError: 'tuple' object has no attribute 'communicate' >[31mFAILED[0m tests/test_subprocess.py::[1mtest_non_piped_same_file[False-False][0m - AttributeError: 'tuple' object has no attribute 'communicate' >[31m============================================================ [31m[1m24 failed[0m, [32m108 passed[0m, [33m4 skipped[0m, [33m27 warnings[0m[31m in 8.29s[0m[31m ============================================================[0m >pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo(<process_name>).terminate()'. > [31;01m*[0m ERROR: dev-python/pytest-subprocess-1.5.0::gentoo failed (test phase): > [31;01m*[0m pytest failed with python3.11 > [31;01m*[0m > [31;01m*[0m Call stack: > [31;01m*[0m ebuild.sh, line 136: Called src_test > [31;01m*[0m environment, line 4103: Called distutils-r1_src_test > [31;01m*[0m environment, line 2023: Called _distutils-r1_run_foreach_impl 'python_test' > [31;01m*[0m environment, line 817: Called python_foreach_impl 'distutils-r1_run_phase' 'python_test' > [31;01m*[0m environment, line 3662: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' > [31;01m*[0m environment, line 3190: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' > [31;01m*[0m environment, line 3188: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_test' > [31;01m*[0m environment, line 1266: Called distutils-r1_run_phase 'python_test' > [31;01m*[0m environment, line 1946: Called python_test > [31;01m*[0m environment, line 3945: Called epytest '-p' 'no:flaky' > [31;01m*[0m environment, line 2617: Called die > [31;01m*[0m The specific snippet of code: > [31;01m*[0m [[ ${ret} -ne 0 ]] && die -n "pytest failed with ${EPYTHON}"; > [31;01m*[0m > [31;01m*[0m If you need support, post the output of `emerge --info '=dev-python/pytest-subprocess-1.5.0::gentoo'`, > [31;01m*[0m the complete build log and the output of `emerge -pqv '=dev-python/pytest-subprocess-1.5.0::gentoo'`. > [31;01m*[0m The complete build log is located at '/var/log/portage/dev-python:pytest-subprocess-1.5.0:20240529-021706.log'. > [31;01m*[0m For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/build.log'. > [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/temp/environment'. > [31;01m*[0m Working directory: '/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0' > [31;01m*[0m S: '/var/tmp/portage/dev-python/pytest-subprocess-1.5.0/work/pytest-subprocess-1.5.0'
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 933098
: 894583 |
894584