June 2017
Beginner
352 pages
8h 39m
English
We'll demonstrate how to use pip by installing the nose testing tool. The nose command is a sort of power-tool for running unittest based tests such as those we developed in Chapter 10, Unit testing with the Python standard library. One really useful thing it can do is discover all of your tests and run them. This means that you don't need to add unittest.main() into your code; you can just use nose to find and run your tests.
First though, we need to do some groundwork. Let's create a virtual environment (see Appendix B, Pakaging and Distribution) so we don't inadvertently install into our system Python installation. Create a virtual environment using pyenv, and activate it:
$ python3 -m venv test_env$ source activate ...
Read now
Unlock full access