5. Test Package#
You can test the package using either pytest or tox.
5.1. Test with pytest#
The package can be tested by running several test scripts, which test all sub-packages and examples.
Clone the source code from the repository and install the required test packages by
git clone https://github.com/ameli/restoreio.git
cd restoreio
python -m pip install -r tests/requirements.txt
python setup.py install
To automatically run all tests, use pytest which is installed by the above commands.
mv restoreio restoreio-do-not-import
pytest
Attention
To properly run pytest, rename /restoreio/restoreio directory as shown in the above code. This makes pytest to properly import restoreio from the installed location, not from the source code directory.
5.2. Test with tox#
To run a test in a virtual environment, use tox as follows:
Clone the source code from the repository:
git clone https://github.com/ameli/restoreio.gitInstall tox:
python -m pip install toxRun tests by
cd restoreio tox