Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example tests #50

Merged
merged 9 commits into from
Jan 13, 2021
Merged

Add example tests #50

merged 9 commits into from
Jan 13, 2021

Conversation

raman325
Copy link
Contributor

Core integrations can look at other integrations to learn how to write tests but there is no equivalent for custom components. This PR adds 100% test coverage to integration_blueprint along with some additional information which will help authors write tests for their custom components.

@oncleben31
Copy link
Contributor

Nice, I was planning to work on this topic to integrate tests in my cookiecutter project for custom component.

raman325 added a commit to raman325/cookiecutter-homeassistant-custom-component that referenced this pull request Jan 6, 2021
Copy link
Owner

@ludeeus ludeeus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oncleben31
Copy link
Contributor

Don't forget to pin the requirements as done in oncleben31/cookiecutter-homeassistant-custom-component#112 to avoid potential difficulties for new install

Copy link
Owner

@ludeeus ludeeus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 🎉

@ludeeus ludeeus merged commit e059bc7 into ludeeus:master Jan 13, 2021
@raman325 raman325 deleted the add_tests branch January 13, 2021 17:56
oncleben31 added a commit to oncleben31/cookiecutter-homeassistant-custom-component that referenced this pull request Jan 13, 2021
* add tests using ludeeus/integration_blueprint#50 as base

* move tests folder to the right place

* add test files to files table

* try to fix

* move requirements to appropriate folder

* add a note to contributing about tests

* add a note to contributing about tests

* Update docs/guide.rst

Co-authored-by: Oncleben31 <oncleben31@users.noreply.github.com>

* Update {{cookiecutter.project_name}}/CONTRIBUTING.md

Co-authored-by: Oncleben31 <oncleben31@users.noreply.github.com>

* Update {{cookiecutter.project_name}}/tests/test_init.py

Co-authored-by: Oncleben31 <oncleben31@users.noreply.github.com>

* address review comments

* add more comments

* fix description for requirements files

* add more comments

* update gitignore and fix CONTRIBUTING

* add dummy init file so that pytest works

* Update {{cookiecutter.project_name}}/requirements_test.txt

Co-authored-by: Oncleben31 <oncleben31@users.noreply.github.com>

* fix import statements

* Fix spelling

* bypass setup in config flow

* fix comment

* incorporate comments that were in integration_blueprint PR

* add tests to isort known_first_party

Co-authored-by: Oncleben31 <oncleben31@users.noreply.github.com>
oncleben31 pushed a commit to oncleben31/cookiecutter-homeassistant-custom-component-instance that referenced this pull request Jan 13, 2021
* add tests using ludeeus/integration_blueprint#50 as base

* move tests folder to the right place

* add test files to files table

* try to fix

* move requirements to appropriate folder

* add a note to contributing about tests

* add a note to contributing about tests

* Update docs/guide.rst

Co-authored-by: Oncleben31 <oncleben31@users.noreply.github.com>

* Update {{cookiecutter.project_name}}/CONTRIBUTING.md

Co-authored-by: Oncleben31 <oncleben31@users.noreply.github.com>

* Update {{cookiecutter.project_name}}/tests/test_init.py

Co-authored-by: Oncleben31 <oncleben31@users.noreply.github.com>

* address review comments

* add more comments

* fix description for requirements files

* add more comments

* update gitignore and fix CONTRIBUTING

* add dummy init file so that pytest works

* Update {{cookiecutter.project_name}}/requirements_test.txt

Co-authored-by: Oncleben31 <oncleben31@users.noreply.github.com>

* fix import statements

* Fix spelling

* bypass setup in config flow

* fix comment

* incorporate comments that were in integration_blueprint PR

* add tests to isort known_first_party

Co-authored-by: Oncleben31 <oncleben31@users.noreply.github.com>

Original-Commit: oncleben31/cookiecutter-homeassistant-custom-component@b5c30b5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants