Browse Source

Fixed how_to_develop.md Unit Tests saying tox is required

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.6.6
evandrocoan 6 years ago
committed by Erez Shinan
parent
commit
6299d60c35
1 changed files with 16 additions and 8 deletions
  1. +16
    -8
      docs/how_to_develop.md

+ 16
- 8
docs/how_to_develop.md 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`

Loading…
Cancel
Save