Fixed how_to_develop.md Unit Tests saying tox is required

This commit is contained in:
evandrocoan 2018-12-29 06:46:59 -02:00 committed by Erez Shinan
parent 3fb0c48557
commit 6299d60c35
1 changed files with 16 additions and 8 deletions

View File

@ -14,17 +14,14 @@ If you're interested in taking one of these on, let me know and I will provide m
## Unit Tests
To run all Unit Tests,
install tox and Python 2.7 up to the latest python version supported (consult the file tox.ini).
Then,
run the command `tox` on the root of this project (where the main setup.py file is on).
If you would like to only run the Unit Tests for Python version 2.7,
you can run the command `tox -e py27`
If you would like to run all Unit Tests,
all you need is a supported Python Interpreter.
You can consult the list of supported interpreter for unit testing on the `tox.ini` file.
Then, just run the command `python -m tests`
If you would like to run a single Unit Test,
you do not need to use tox,
you can directly run it with your current python interpreter.
you can directly run it with your installed Python Interpreter.
First you need to figure out what is the test full name.
For example:
```python
@ -37,3 +34,14 @@ Equivalent example/way, but unrecommended:
## test_package.tests_module.test_class_name.test_function_name
python -m unittest tests.test_parser.TestLalrStandard.test_lexer_error_recovering
```
### tox
To run all Unit Tests with tox,
install tox and Python 2.7 up to the latest python interpreter supported (consult the file tox.ini).
Then,
run the command `tox` on the root of this project (where the main setup.py file is on).
And, for example,
if you would like to only run the Unit Tests for Python version 2.7,
you can run the command `tox -e py27`