diff --git a/atom.xml b/atom.xml index 521fd64236..85fa932728 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@
Running Tox will run unit tests against the locally available Pythons, as well as validate the code and document style using pycodestyle
, pydocstyle
and pylint
. You can run tests on only one tox target – just use -e
to select an environment. For example, tox -e lint
runs the linters only, and tox -e py34
runs unit tests only on Python 3.4.
Tox uses virtual environments under the hood to create isolated testing environments. The tox virtual environments will get out-of-date when requirements change, causing test errors. Run tox -r
to tell Tox to recreate the virtual environments.
If you are working on tests for a component or platform and you need the dependencies available inside the Tox environment, update the list inside script/gen_requirements_all.py
. Then run the script and then run tox -r
to recreate the virtual environments.
You can pass arguments via Tox to py.test to be able to run single test suites or test files. Replace py36
with the Python version that you use.
# Stop after the first test fails
+$ tox -e py36 tests/test_core.py -x
+# Run test with specified name
+$ tox -e py36 tests/test_core.py -k test_split_entity_id
+# Fail a test after it runs for 2 seconds
+$ tox -e py36 tests/test_core.py --timeout 2
+# Show the 10 slowest tests
+$ tox -e py36 tests/test_core.py --duration=10
+
+Running tox will invoke the full test suite. Even if you specify which tox target to run, you still run all tests inside that target. That’s not very convenient to quickly iterate on your code! To be able to run the specific test suites without Tox, you’ll need to install the test dependencies into your Python environment:
$ bash pip3 install -r requirements_test_all.txt
@@ -90,18 +102,6 @@
$ script/lint --changed
Py.test has some great command line parameters to help you with the write-test-fix cycle.
-# Stop after the first test fails
-$ py.test tests/test_core.py -x
-# Run test with specified name
-$ py.test tests/test_core.py -k test_split_entity_id
-# Fail a test after it runs for 2 seconds
-$ py.test tests/test_core.py --timeout 2
-# Show the 10 slowest tests
-$ py.test tests/test_core.py --duration=10
-
-Save yourself the hassle of extra commits just to fix style errors by enabling the Flake8 git commit hook. Flake8 will check your code when you try to commit to the repository and block the commit if there are any style errors, which gives you a chance to fix them!
$ pip3 install flake8 flake8-docstrings
diff --git a/sitemap.xml b/sitemap.xml
index f0fd777ba2..9121a67dfd 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -3454,62 +3454,62 @@
https://home-assistant.io/demo/frontend.html
-2017-05-22T20:36:57+00:00
+2017-05-22T20:43:56+00:00
https://home-assistant.io/demo/index.html
-2017-05-22T20:36:57+00:00
+2017-05-22T20:43:56+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-event.html
-2017-05-22T20:36:57+00:00
+2017-05-22T20:43:56+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-info.html
-2017-05-22T20:36:57+00:00
+2017-05-22T20:43:56+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-service.html
-2017-05-22T20:36:57+00:00
+2017-05-22T20:43:56+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-state.html
-2017-05-22T20:36:57+00:00
+2017-05-22T20:43:56+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-template.html
-2017-05-22T20:36:57+00:00
+2017-05-22T20:43:56+00:00
https://home-assistant.io/demo/panels/ha-panel-history.html
-2017-05-22T20:36:57+00:00
+2017-05-22T20:43:56+00:00
https://home-assistant.io/demo/panels/ha-panel-iframe.html
-2017-05-22T20:36:57+00:00
+2017-05-22T20:43:56+00:00
https://home-assistant.io/demo/panels/ha-panel-logbook.html
-2017-05-22T20:36:57+00:00
+2017-05-22T20:43:56+00:00
https://home-assistant.io/demo/panels/ha-panel-map.html
-2017-05-22T20:36:57+00:00
+2017-05-22T20:43:56+00:00
https://home-assistant.io/googlef4f3693c209fe788.html
-2017-05-22T20:36:57+00:00
+2017-05-22T20:43:56+00:00
https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html
-2017-05-22T20:36:57+00:00
+2017-05-22T20:43:56+00:00
https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html
-2017-05-22T20:36:57+00:00
+2017-05-22T20:43:56+00:00
https://home-assistant.io/static/mdi-demo.html
-2017-05-22T20:36:57+00:00
+2017-05-22T20:43:56+00:00