Commit Graph

35 Commits (99ab2566c25a3ba40b205302065740907675bd84)

Author SHA1 Message Date
epenet 3d1165519d
Fix broad-exception-raised in component tests (#119467) 2024-06-12 17:53:42 +02:00
Sid 3799d20d43
Enable Ruff B905 (#114197) 2024-04-14 00:14:26 -05:00
Joost Lekkerkerker 5d500cb74b
Use is in enum comparison in config flow tests K-O (#114672) 2024-04-02 11:21:42 -10:00
Sid 00ec7f11f0
Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +01:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller 1722e23df8
Add empty line after module docstring [tests l-p] (#112710) 2024-03-08 14:55:15 +01:00
Jan-Philipp Benecke 9326ea09a5
Update m* tests to use entity & device registry fixtures (#103980) 2023-11-15 10:33:11 +01:00
Franck Nijhof 9030ca05b1
Enable Ruff SIM118 (#87772) 2023-02-15 12:39:12 +01:00
Franck Nijhof c56832bb2c
Enable Ruff SIM300 (#86793) 2023-01-30 11:03:23 +01:00
Franck Nijhof e4a78420b8
Enable Ruff PT013 (#86757)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-27 09:09:46 +01:00
Michael 104f74054b
Replace the usage of unit constants by enumerations in Tests [m-n] (#85935)
* replace unit conts by enums m-n

* fix mqtt
2023-01-15 15:45:00 +01:00
G Johansson 635d8c01fb
Add sum to min_max helper (#82651)
sum to min_max
2022-11-24 20:21:09 +01:00
G Johansson 8704f1aa47
Fully type min_max (#79496) 2022-11-23 19:54:12 +01:00
G Johansson 9eef5129f0
Full test coverage Min Max (#82053) 2022-11-15 09:04:22 -06:00
G Johansson be7e61b88b
Add unique id for min_max (#81007) 2022-10-26 11:27:44 +02:00
Justin Sherman f26fadbdfc
Add range to min_max (#78282) 2022-09-25 23:08:31 -04:00
Franck Nijhof a6244eea28
Search/replace RESULT_TYPE_* by FlowResultType enum (#74656) 2022-07-07 21:28:18 +02:00
Maciej Bieniek c6b835dd91
Add missing `state_class` to min_max sensors (#73169)
Add missing state_class
2022-06-07 17:02:12 +02:00
J. Nick Koston 40eb1554d9
Only set attributes based on the configured type for min_max sensors (#70142) 2022-04-17 22:53:49 -07:00
Erik Montnemery 66d892237d
Add config flow for min_max sensor (#67807)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-03-28 09:39:54 +02:00
Paulus Schoutsen 31153ac155
Move fixtures part 1 (#58902) 2021-11-01 20:47:05 -07:00
Franck Nijhof 5a2b5fe7c5
Yoda assertion style removed is (#48142) 2021-03-20 13:55:10 +01:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Ariana Hlavaty 329e56fac0
Rewrite min_max unittest tests to pytest style test function (#41296)
* Rewrite min_max unittest tests to pytest style test function

For: #40866

* Use uppercase letters for constants

* Remove not needed line

* Fix missing rename to uppercase

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-05 22:57:58 +02:00
springstan d2b1918e9c
Drop UNIT_ prefix for percentage constant (#39383) 2020-09-05 21:09:14 +02:00
Paulus Schoutsen 6de02fc1b9
Fix some more usages of asynctest (#39570) 2020-09-02 14:53:07 +02:00
J. Nick Koston d2195e2b37
Add support for reloading min_max from yaml (#39327)
* Add support for reloading min_max from yaml

* git add
2020-08-28 10:23:19 -05:00
Thorjan Knudsvik e6ff8d6839
Adds median to min_max component (#36686) 2020-07-18 16:18:31 -07:00
Thomas Hollstegge fa55f01c8c
Report entity IDs for min/max sensor platform (#33806)
* Report entity ids for min/max sensor platform

* Use better variable names
2020-05-25 16:08:49 -04:00
springstan 78d87dc40f
Use TEMP_CELSIUS constant (#33963) 2020-04-10 19:17:46 +02:00
Franck Nijhof 98a2efcbab
Collection of random (mainly) test improvements (#33733) 2020-04-06 12:51:48 +02:00
springstan f1a0ca7cd3
Add and use percentage constant (#32094)
* Add and use percentage constant

* Fix pylint error and broken test
2020-02-28 11:46:48 -08:00
Bas Nijholt 710680d604 use isort to sort imports for components starting with 'm' (#29772) 2019-12-09 18:50:40 +05:30
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Penny Wood f195ecca4b Consolidate all platforms that have tests (#22109)
* Moved climate components with tests into platform dirs.

* Updated tests from climate component.

* Moved binary_sensor components with tests into platform dirs.

* Updated tests from binary_sensor component.

* Moved calendar components with tests into platform dirs.

* Updated tests from calendar component.

* Moved camera components with tests into platform dirs.

* Updated tests from camera component.

* Moved cover components with tests into platform dirs.

* Updated tests from cover component.

* Moved device_tracker components with tests into platform dirs.

* Updated tests from device_tracker component.

* Moved fan components with tests into platform dirs.

* Updated tests from fan component.

* Moved geo_location components with tests into platform dirs.

* Updated tests from geo_location component.

* Moved image_processing components with tests into platform dirs.

* Updated tests from image_processing component.

* Moved light components with tests into platform dirs.

* Updated tests from light component.

* Moved lock components with tests into platform dirs.

* Moved media_player components with tests into platform dirs.

* Updated tests from media_player component.

* Moved scene components with tests into platform dirs.

* Moved sensor components with tests into platform dirs.

* Updated tests from sensor component.

* Moved switch components with tests into platform dirs.

* Updated tests from sensor component.

* Moved vacuum components with tests into platform dirs.

* Updated tests from vacuum component.

* Moved weather components with tests into platform dirs.

* Fixed __init__.py files

* Fixes for stuff moved as part of this branch.

* Fix stuff needed to merge with balloob's branch.

* Formatting issues.

* Missing __init__.py files.

* Fix-ups

* Fixup

* Regenerated requirements.

* Linting errors fixed.

* Fixed more broken tests.

* Missing init files.

* Fix broken tests.

* More broken tests

* There seems to be a thread race condition.
I suspect the logger stuff is running in another thread, which means waiting until the aio loop is done is missing the log messages.
Used sleep instead because that allows the logger thread to run. I think the api_streams sensor might not be thread safe.

* Disabled tests, will remove sensor in #22147

* Updated coverage and codeowners.
2019-03-18 23:07:39 -07:00