Skip to content

Commit 58ebb42

Browse files
authored
Update development_testing.markdown
1 parent eae981b commit 58ebb42

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

source/developers/development_testing.markdown

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,19 @@ $ tox
2727

2828
This will run unit tests against python 3.4 and 3.5 (if both are available locally), as well as run a set of tests which validate `pep8` and `pylint` style of the code.
2929

30-
You can optionally run tests on only one tox target using the `-e` option to select an environment.
30+
#### {% linkable_title Testing Tips %}
3131

32-
For instance `tox -e lint` will run the linters only, `tox -e py34` will run unit tests only on python 3.4.
32+
You can optionally run tests on only one tox target using the `-e` option to select an environment. For instance `tox -e lint` will run the linters only, `tox -e py34` will run unit tests only on python 3.4.
33+
34+
Tox uses virtual environments under the hood to create isolated testing environments. The Tox virtual environments will get out date when requirements change causing test errors. Run `tox -r` to create new Tox virtual environments.
35+
36+
During development on a specific file, it can speed up your workflow to just run tests and linting related to the file that you're working on. To run individual files:
37+
38+
```bash
39+
$ flake8 homeassistant/core.py
40+
$ pylint homeassistant/core.py
41+
$ py.test tests/test_core.py
42+
```
3343

3444
### {% linkable_title Prevent Linter Errors %}
3545

0 commit comments

Comments
 (0)