From 3213be0db18cd6b3ecaea9f80bba67c615fc5fb0 Mon Sep 17 00:00:00 2001 From: Jean-Paul van Ravensberg <14926452+DevSecNinja@users.noreply.github.com> Date: Mon, 2 Nov 2020 01:47:26 +0100 Subject: [PATCH] Add codecov command to dev instructions (#711) * Add codecov command * Process review feedback --- docs/development_testing.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/development_testing.md b/docs/development_testing.md index 7a6ad67d..fffe409a 100644 --- a/docs/development_testing.md +++ b/docs/development_testing.md @@ -68,6 +68,12 @@ You can also run linting tests against all changed files, as reported by `git di script/lint ``` +In case you want to check the code coverage for your new component, run the following from the root of the repository: + +````shell +pytest ./tests/components// --cov=homeassistant.components. --cov-report term-missing -vv +```` + ### 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!