| |
@@ -74,20 +74,17 @@
|
| |
Run Tests
|
| |
---------
|
| |
|
| |
- Before make a pull request, ensure local changes pass all test cases. There
|
| |
- are two choices to run tests.
|
| |
+ Before make a pull request, ensure local changes pass all test cases.
|
| |
|
| |
- * Run tests in parallel with ``detox``. Newer version of ``detox`` does not
|
| |
- support ``py26``. You can run rest of test environments::
|
| |
+ Before run tests, install these packages::
|
| |
|
| |
- detox -e py27,py36,py37,flake8
|
| |
+ sudo dnf install python26 python37 detox python2-virtualenv
|
| |
|
| |
- * Run tests inside a Python environment with ``tox``::
|
| |
+ To run tests simply, ``make test``.
|
| |
|
| |
- python3 -m venv env
|
| |
- source env/bin/activate
|
| |
- pip install tox
|
| |
- tox
|
| |
+ By default, target ``test`` runs tests with all supported Python versions.
|
| |
+ However, if you look into ``Makefile``, there is still a target ``tox`` that
|
| |
+ allows developer to run tests with test environments one by one.
|
| |
|
| |
More Information
|
| |
================
|
| |
Dependent tools to run tests do not support Python 2.6 recently, like
tox, that causes
tox -e py26
fails to create a virtual environmentwith python2.6 interpreter.
This patch uses a Makefile to create a Python 2.6 environment with
virtualenv manually and to organize steps to run tests with Python 2.6
and other Python versions in only one command
make test
.Signed-off-by: Chenxiong Qi cqi@redhat.com