How To Install python3-pytest-subprocess on Fedora 36

In this tutorial we learn how to install python3-pytest-subprocess in Fedora 36. python3-pytest-subprocess is A plugin to fake subprocess for pytest

Introduction

In this tutorial we learn how to install python3-pytest-subprocess on Fedora 36.

What is python3-pytest-subprocess

The plugin adds the fake_subprocess fixture. It can be used it to register subprocess results so you won’t need to rely on the real processes. The plugin hooks on the subprocess.Popen(), which is the base for other subprocess functions. That makes the subprocess.run(), subprocess.call(), subprocess.check_call() and subprocess.check_output() methods also functional.

We can use yum or dnf to install python3-pytest-subprocess on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install python3-pytest-subprocess.

Install python3-pytest-subprocess on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install python3-pytest-subprocess using dnf by running the following command:

sudo dnf -y install python3-pytest-subprocess

Install python3-pytest-subprocess on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install python3-pytest-subprocess using yum by running the following command:

sudo yum -y install python3-pytest-subprocess

How To Uninstall python3-pytest-subprocess on Fedora 36

To uninstall only the python3-pytest-subprocess package we can use the following command:

sudo dnf remove python3-pytest-subprocess

python3-pytest-subprocess Package Contents on Fedora 36

/usr/lib/python3.10/site-packages/pytest_subprocess
/usr/lib/python3.10/site-packages/pytest_subprocess-1.4.0.dist-info
/usr/lib/python3.10/site-packages/pytest_subprocess-1.4.0.dist-info/INSTALLER
/usr/lib/python3.10/site-packages/pytest_subprocess-1.4.0.dist-info/LICENSE
/usr/lib/python3.10/site-packages/pytest_subprocess-1.4.0.dist-info/METADATA
/usr/lib/python3.10/site-packages/pytest_subprocess-1.4.0.dist-info/WHEEL
/usr/lib/python3.10/site-packages/pytest_subprocess-1.4.0.dist-info/entry_points.txt
/usr/lib/python3.10/site-packages/pytest_subprocess-1.4.0.dist-info/top_level.txt
/usr/lib/python3.10/site-packages/pytest_subprocess/__init__.py
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/__init__.cpython-310.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/asyncio_subprocess.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/asyncio_subprocess.cpython-310.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/exceptions.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/exceptions.cpython-310.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/fake_popen.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/fake_popen.cpython-310.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/fake_process.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/fake_process.cpython-310.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/fixtures.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/fixtures.cpython-310.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/process_dispatcher.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/process_dispatcher.cpython-310.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/types.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/types.cpython-310.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/utils.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/__pycache__/utils.cpython-310.pyc
/usr/lib/python3.10/site-packages/pytest_subprocess/asyncio_subprocess.py
/usr/lib/python3.10/site-packages/pytest_subprocess/exceptions.py
/usr/lib/python3.10/site-packages/pytest_subprocess/fake_popen.py
/usr/lib/python3.10/site-packages/pytest_subprocess/fake_process.py
/usr/lib/python3.10/site-packages/pytest_subprocess/fixtures.py
/usr/lib/python3.10/site-packages/pytest_subprocess/process_dispatcher.py
/usr/lib/python3.10/site-packages/pytest_subprocess/py.typed
/usr/lib/python3.10/site-packages/pytest_subprocess/types.py
/usr/lib/python3.10/site-packages/pytest_subprocess/utils.py
/usr/share/doc/python3-pytest-subprocess
/usr/share/doc/python3-pytest-subprocess/HISTORY.rst
/usr/share/doc/python3-pytest-subprocess/README.rst

References

Summary

In this tutorial we learn how to install python3-pytest-subprocess on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).