Commit graph

9 commits

Author SHA1 Message Date
epenet
5f25b71df7
Add type hints to core tests (#88478) 2023-02-20 11:42:56 +01:00
Franck Nijhof
ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet
4142f0d15d
Add return type to tests without arguments (#87613)
* Add return type to tests without arguments

* Black

* Cancel fixture amends
2023-02-07 14:20:06 +01:00
Franck Nijhof
49148421cb
Migrates tests to use UnitOfSpeed enum (#86777) 2023-01-27 10:58:55 +01:00
epenet
9c3b40dad1
Deprecate conversion utilities (#78957)
* Deprecate utilities

* Deprecate distance and speed

* Add tests

* Adjust pylint

* Simplify temperature deprecation
2022-09-28 19:39:44 +02:00
epenet
c96c5bed7d
Remove argument validation in Unit Converter (#79107)
* Remove argument validation in Unit Converter

* Use HomeAssistantError

* Adjust tests

* Improve coverage
2022-09-28 10:58:04 +02:00
Erik Montnemery
d3f4108a91
Support knots and ft/s in weather wind speed (#74175) 2022-06-29 16:34:41 +02:00
Erik Montnemery
c186a73e57
Tweak speed util (#74160) 2022-06-29 12:01:09 +02:00
rianadon
a102c425a9
Add speed conversion function & add speed to units system (#53846)
* Add speed conversion function

* Add test for speed utility functions

* Update unit system tests

* Fix incorrect unit conversions in tests

* Fix some test errors

* Calculate speed units from smaller set of constants

* Fix typo in speed test

* Use pytest.approx for checking floating point values

* Change other instance of speeds needing to be pytest.approx

* Revert changes to unit system

* Fix oopsie in defining in/day and in/hr

* Parametrize test

* Add comments describing calculations & remove duplicate test
2021-11-09 08:12:28 +01:00