How To Install python3-pytest-doctestplus on AlmaLinux 8

In this tutorial we learn how to install python3-pytest-doctestplus in AlmaLinux 8. python3-pytest-doctestplus is The py.test doctestplus plugin

Introduction

In this tutorial we learn how to install python3-pytest-doctestplus on AlmaLinux 8.

What is python3-pytest-doctestplus

The doctestplus plugin provides advanced features for testing example Python code that is included in Python docstrings and in standalone documentation files. Good documentation for developers contains example code. This is true of both standalone documentation and of documentation that is integrated with the code itself. Python provides a mechanism for testing code snippets that are provided in Python docstrings. The unit test framework pytest provides a mechanism for running doctests against both docstrings in source code and in standalone documentation files. This plugin augments the functionality provided by Python and pytest by providing the following features * approximate floating point comparison for doctests that produce floating point results * skipping particular classes, methods, and functions when running doctests * handling doctests that use remote data in conjunction with the pytest-remotedata plugin * optional inclusion of *.rst files for doctests

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

Install python3-pytest-doctestplus on AlmaLinux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install python3-pytest-doctestplus

Install python3-pytest-doctestplus on AlmaLinux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install python3-pytest-doctestplus

How To Uninstall python3-pytest-doctestplus on AlmaLinux 8

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

sudo dnf remove python3-pytest-doctestplus

References

Summary

In this tutorial we learn how to install python3-pytest-doctestplus on AlmaLinux 8 using yum and dnf.