From 24c5dd3eb1b87f62f50bfecf4a8772026a9ed340 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Mon, 22 May 2017 20:49:58 +0000 Subject: [PATCH] Site updated at 2017-05-22 20:49:57 UTC --- atom.xml | 2 +- blog/categories/announcements/atom.xml | 2 +- blog/categories/community/atom.xml | 2 +- blog/categories/device-tracking/atom.xml | 2 +- blog/categories/esp8266/atom.xml | 2 +- blog/categories/how-to/atom.xml | 2 +- blog/categories/ibeacons/atom.xml | 2 +- blog/categories/internet-of-things/atom.xml | 2 +- blog/categories/iot-data/atom.xml | 2 +- blog/categories/merchandise/atom.xml | 2 +- blog/categories/micropython/atom.xml | 2 +- blog/categories/mqtt/atom.xml | 2 +- blog/categories/organisation/atom.xml | 2 +- blog/categories/owntracks/atom.xml | 2 +- blog/categories/presence-detection/atom.xml | 2 +- .../public-service-announcement/atom.xml | 2 +- blog/categories/release-notes/atom.xml | 2 +- blog/categories/survey/atom.xml | 2 +- blog/categories/talks/atom.xml | 2 +- blog/categories/technology/atom.xml | 2 +- blog/categories/user-stories/atom.xml | 2 +- blog/categories/video/atom.xml | 2 +- blog/categories/website/atom.xml | 2 +- developers/development_testing/index.html | 26 ++++++++-------- sitemap.xml | 30 +++++++++---------- 25 files changed, 51 insertions(+), 51 deletions(-) diff --git a/atom.xml b/atom.xml index 521fd64236..85fa932728 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/announcements/atom.xml b/blog/categories/announcements/atom.xml index 9e8e641b85..a270545dc0 100644 --- a/blog/categories/announcements/atom.xml +++ b/blog/categories/announcements/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Announcements | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index be0e3f0d59..3b9a544468 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml index 93015973e8..46b1eed934 100644 --- a/blog/categories/device-tracking/atom.xml +++ b/blog/categories/device-tracking/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Device-Tracking | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index 7cf116521f..909dd6bbe8 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index 49e88da432..9b0f8ceacd 100644 --- a/blog/categories/how-to/atom.xml +++ b/blog/categories/how-to/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: How-To | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index 82eb449f5f..35bf9bf811 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/internet-of-things/atom.xml b/blog/categories/internet-of-things/atom.xml index 670cce790a..6e8f25ca7d 100644 --- a/blog/categories/internet-of-things/atom.xml +++ b/blog/categories/internet-of-things/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Internet-of-Things | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/iot-data/atom.xml b/blog/categories/iot-data/atom.xml index e82c8b84d8..01888ab4d1 100644 --- a/blog/categories/iot-data/atom.xml +++ b/blog/categories/iot-data/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: IoT-Data | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/merchandise/atom.xml b/blog/categories/merchandise/atom.xml index 9ef66e8702..9c66421360 100644 --- a/blog/categories/merchandise/atom.xml +++ b/blog/categories/merchandise/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Merchandise | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/micropython/atom.xml b/blog/categories/micropython/atom.xml index 415fee6f69..0643d031b7 100644 --- a/blog/categories/micropython/atom.xml +++ b/blog/categories/micropython/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Micropython | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index aae482e0dc..3c8f3a5f18 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml index d3c52478d3..5eedfcb172 100644 --- a/blog/categories/organisation/atom.xml +++ b/blog/categories/organisation/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organisation | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index 341e065a55..500ff74f12 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index 4ac6caca38..9fd459c5af 100644 --- a/blog/categories/presence-detection/atom.xml +++ b/blog/categories/presence-detection/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Presence-Detection | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/public-service-announcement/atom.xml b/blog/categories/public-service-announcement/atom.xml index 533b8ae023..2f3ccdc158 100644 --- a/blog/categories/public-service-announcement/atom.xml +++ b/blog/categories/public-service-announcement/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Public-Service-Announcement | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index bf75113f6f..3656ee0847 100644 --- a/blog/categories/release-notes/atom.xml +++ b/blog/categories/release-notes/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Release-Notes | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index 1fd53b6ce2..3517ce35ff 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index 5bba72aad6..b8d2dca234 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml index 1c04c1298f..bd62aefce9 100644 --- a/blog/categories/technology/atom.xml +++ b/blog/categories/technology/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Technology | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index cf1cc2a663..7e38368221 100644 --- a/blog/categories/user-stories/atom.xml +++ b/blog/categories/user-stories/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: User-Stories | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml index 4b385e7abb..265f3a01f5 100644 --- a/blog/categories/video/atom.xml +++ b/blog/categories/video/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Video | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index 4534d90a74..eb0d246c65 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2017-05-22T20:37:44+00:00 + 2017-05-22T20:44:50+00:00 https://home-assistant.io/ diff --git a/developers/development_testing/index.html b/developers/development_testing/index.html index 06ed15faad..3513ed6098 100644 --- a/developers/development_testing/index.html +++ b/developers/development_testing/index.html @@ -74,7 +74,19 @@

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.

-

Testing single files

+

Running single tests using Tox

+

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
+
+
+

Testing outside of Tox

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 tips

-

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
-
-

Preventing Linter Errors

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