How To Install python3-pyfakefs on Fedora 36

In this tutorial we learn how to install python3-pyfakefs in Fedora 36. python3-pyfakefs is pyfakefs implements a fake file system that mocks the Python file system modules.

Introduction

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

What is python3-pyfakefs

pyfakefs implements a fake file system that mocks the Python file system modules. Using pyfakefs, your tests operate on a fake file system in memory without touching the real disk. The software under test requires no modification to work with pyfakefs.

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

Install python3-pyfakefs 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-pyfakefs using dnf by running the following command:

sudo dnf -y install python3-pyfakefs

Install python3-pyfakefs 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-pyfakefs using yum by running the following command:

sudo yum -y install python3-pyfakefs

How To Uninstall python3-pyfakefs on Fedora 36

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

sudo dnf remove python3-pyfakefs

python3-pyfakefs Package Contents on Fedora 36

/usr/lib/python3.10/site-packages/pyfakefs
/usr/lib/python3.10/site-packages/pyfakefs-4.4.0-py3.10.egg-info
/usr/lib/python3.10/site-packages/pyfakefs-4.4.0-py3.10.egg-info/PKG-INFO
/usr/lib/python3.10/site-packages/pyfakefs-4.4.0-py3.10.egg-info/SOURCES.txt
/usr/lib/python3.10/site-packages/pyfakefs-4.4.0-py3.10.egg-info/dependency_links.txt
/usr/lib/python3.10/site-packages/pyfakefs-4.4.0-py3.10.egg-info/entry_points.txt
/usr/lib/python3.10/site-packages/pyfakefs-4.4.0-py3.10.egg-info/top_level.txt
/usr/lib/python3.10/site-packages/pyfakefs/__init__.py
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/__init__.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/_version.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/_version.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/deprecator.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/deprecator.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/extra_packages.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/extra_packages.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/fake_filesystem.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/fake_filesystem.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/fake_filesystem_shutil.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/fake_filesystem_shutil.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/fake_filesystem_unittest.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/fake_filesystem_unittest.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/fake_pathlib.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/fake_pathlib.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/fake_scandir.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/fake_scandir.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/helpers.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/helpers.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/mox3_stubout.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/mox3_stubout.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/patched_packages.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/patched_packages.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/pytest_plugin.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/__pycache__/pytest_plugin.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/_version.py
/usr/lib/python3.10/site-packages/pyfakefs/deprecator.py
/usr/lib/python3.10/site-packages/pyfakefs/extra_packages.py
/usr/lib/python3.10/site-packages/pyfakefs/fake_filesystem.py
/usr/lib/python3.10/site-packages/pyfakefs/fake_filesystem_shutil.py
/usr/lib/python3.10/site-packages/pyfakefs/fake_filesystem_unittest.py
/usr/lib/python3.10/site-packages/pyfakefs/fake_pathlib.py
/usr/lib/python3.10/site-packages/pyfakefs/fake_scandir.py
/usr/lib/python3.10/site-packages/pyfakefs/helpers.py
/usr/lib/python3.10/site-packages/pyfakefs/mox3_stubout.py
/usr/lib/python3.10/site-packages/pyfakefs/patched_packages.py
/usr/lib/python3.10/site-packages/pyfakefs/pytest_plugin.py
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__init__.py
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/__init__.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/conftest.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/conftest.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/example.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/example.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/pytest_check_failed_plugin_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/pytest_check_failed_plugin_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/pytest_doctest_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/pytest_doctest_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/pytest_fixture_param_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/pytest_fixture_param_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/pytest_fixture_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/pytest_fixture_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/pytest_plugin_failing_helper.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/pytest_plugin_failing_helper.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/pytest_plugin_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/__pycache__/pytest_plugin_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/conftest.py
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/example.py
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/pytest_check_failed_plugin_test.py
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/pytest_doctest_test.py
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/pytest_fixture_param_test.py
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/pytest_fixture_test.py
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/pytest_plugin_failing_helper.py
/usr/lib/python3.10/site-packages/pyfakefs/pytest_tests/pytest_plugin_test.py
/usr/lib/python3.10/site-packages/pyfakefs/tests
/usr/lib/python3.10/site-packages/pyfakefs/tests/__init__.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/__init__.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/all_tests.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/all_tests.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/all_tests_without_extra_packages.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/all_tests_without_extra_packages.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/dynamic_patch_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/dynamic_patch_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/example.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/example.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/example_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/example_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_filesystem_glob_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_filesystem_glob_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_filesystem_shutil_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_filesystem_shutil_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_filesystem_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_filesystem_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_filesystem_unittest_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_filesystem_unittest_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_filesystem_vs_real_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_filesystem_vs_real_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_open_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_open_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_os_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_os_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_pathlib_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_pathlib_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_stat_time_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_stat_time_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_tempfile_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/fake_tempfile_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/import_as_example.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/import_as_example.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/logsio.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/logsio.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/mox3_stubout_example.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/mox3_stubout_example.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/mox3_stubout_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/mox3_stubout_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/patched_packages_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/patched_packages_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/performance_test.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/performance_test.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/test_utils.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/__pycache__/test_utils.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/all_tests.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/all_tests_without_extra_packages.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/dynamic_patch_test.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/example.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/example_test.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/fake_filesystem_glob_test.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/fake_filesystem_shutil_test.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/fake_filesystem_test.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/fake_filesystem_unittest_test.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/fake_filesystem_vs_real_test.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/fake_open_test.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/fake_os_test.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/fake_pathlib_test.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/fake_stat_time_test.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/fake_tempfile_test.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/fixtures
/usr/lib/python3.10/site-packages/pyfakefs/tests/fixtures/__init__.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/fixtures/__pycache__
/usr/lib/python3.10/site-packages/pyfakefs/tests/fixtures/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/fixtures/__pycache__/__init__.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/fixtures/__pycache__/config_module.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/fixtures/__pycache__/config_module.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/fixtures/__pycache__/deprecated_property.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/fixtures/__pycache__/deprecated_property.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/fixtures/__pycache__/module_with_attributes.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/fixtures/__pycache__/module_with_attributes.cpython-310.pyc
/usr/lib/python3.10/site-packages/pyfakefs/tests/fixtures/config_module.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/fixtures/deprecated_property.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/fixtures/module_with_attributes.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/import_as_example.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/logsio.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/mox3_stubout_example.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/mox3_stubout_test.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/patched_packages_test.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/performance_test.py
/usr/lib/python3.10/site-packages/pyfakefs/tests/test_utils.py
/usr/share/doc/python3-pyfakefs
/usr/share/doc/python3-pyfakefs/README.md
/usr/share/licenses/python3-pyfakefs
/usr/share/licenses/python3-pyfakefs/COPYING

References

Summary

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