How To Install python-pytest-expect on Debian 10

Learn how to install python-pytest-expect on Debian 10 with this tutorial. python-pytest-expect is py.test plugin to store test expectations

Introduction

In this tutorial we learn how to install python-pytest-expect on Debian 10.

What is python-pytest-expect

python-pytest-expect is:

A py.test plugin that stores test expectations by saving the set of failing tests, allowing them to be marked as xfail when running them in future. The tests expectations are stored such that they can be distributed alongside the tests. However, note that test expectations can only be reliably shared between Python 2 and Python 3 if they only use ASCII characters in their node ids: this likely isn??t a limitation if tests are using the normal Python format, as Python 2 only allows ASCII characters in identifiers.

This package contains the Python 2 version of pytest-expect

There are three methods to install python-pytest-expect on Debian 10. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install python-pytest-expect Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install python-pytest-expect using apt-get by running the following command:

sudo apt-get -y install python-pytest-expect

Install python-pytest-expect Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install python-pytest-expect using apt by running the following command:

sudo apt -y install python-pytest-expect

Install python-pytest-expect Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install python-pytest-expect using aptitude by running the following command:

sudo aptitude -y install python-pytest-expect

How To Uninstall python-pytest-expect on Debian 10

To uninstall only the python-pytest-expect package we can use the following command:

sudo apt-get remove python-pytest-expect

Uninstall python-pytest-expect And Its Dependencies

To uninstall python-pytest-expect and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove python-pytest-expect

Remove python-pytest-expect Configurations and Data

To remove python-pytest-expect configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge python-pytest-expect

Remove python-pytest-expect configuration, data, and all of its dependencies

We can use the following command to remove python-pytest-expect configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge python-pytest-expect

Dependencies

python-pytest-expect have the following dependencies:

References

Summary

In this tutorial we learn how to install python-pytest-expect package on Debian 10 using different package management tools: apt, apt-get and aptitude.