@@ -10,23 +10,46 @@ Note: the pytest tests from zerotest are currently unused and disabled.
1010
1111## Installing Test Dependencies
1212
13- For now, you'll need to install
14- [ zerotest] ( https://github.com/jjyr/zerotest )
13+ For now, you need to install [ zerotest] ( https://github.com/jjyr/zerotest )
1514to run these tests, and/or generate new ones in the same way.
1615
17- This is mainly tested with python3, but has been seen to work
18- on python2 also. To install dependencies:
16+ This is mainly tested with python3, but has been seen to work on python2.
1917
20- pip install -r requirements.txt
18+ ### Create a Python virtual environment
2119
22- or perhaps the following (or similar) if you have multiple Python
23- installations.
20+ Create a new [ virtual environment ] ( https://packaging.python.org/tutorials/installing-packages/#creating-virtual-environments )
21+ for the project:
2422
25- pip3 install -r requirements.txt
23+ $ python3 -m venv smoketest-venv
2624
27- Installing inside an isolated
28- [ virtual environment] ( https://packaging.python.org/tutorials/installing-packages/#creating-virtual-environments )
29- (aka virtualenv) is the preferred approach.
25+ (This creates a directory called "smoketest-venv" inside the current
26+ directory.)
27+
28+ On Debian/Ubuntu systems, the command above may instruct you to first install
29+ ` python3-venv ` . If you are using Python 3.4 and installing ` python3-venv `
30+ gives you an error like the following:
31+
32+ > E: Unable to locate package python3-venv
33+
34+ then you can try installing ` python3.4-venv ` instead. This was seen
35+ [ to be required] ( https://bugs.launchpad.net/ubuntu/+source/python3.4/+bug/1532231 )
36+ on Ubuntu.
37+
38+ To activate the virtual environment in a new shell window:
39+
40+ $ source smoketest-venv/bin/activate
41+
42+ ### Installing Python dependencies
43+
44+ Install the Python dependencies in your Python environment (e.g. in the
45+ virtual environment you created above):
46+
47+ $ pip install -r requirements.txt
48+
49+ (You may need to replace ` pip ` with ` pip3 ` above depending on your system.)
50+
51+ If ` requirements.txt ` ever needs updating, you can follow the instructions
52+ inside ` requirements.in ` .
3053
3154## Running a smoketest
3255
0 commit comments