Commit Graph
367 Commits
Author SHA1 Message Date
Joakim Plate c576a68d33 Upgrade pytest-aiohttp (#82475)
* Upgrade pytest-aiohttp

* Make sure executors, tasks and timers are closed

Some test will trigger warnings on garbage collect, these warnings
spills over into next test.

Some test trigger tasks that raise errors on shutdown, these spill
over into next test.

This is to mimic older pytest-aiohttp and it's behaviour on test
cleanup.

Discussions on similar changes for pytest-aiohttp are here:
https://github.com/pytest-dev/pytest-asyncio/pull/309

* Replace loop with event_loop

* Make sure time is frozen for tests

* Make sure the ConditionType is not async

  /home-assistant/homeassistant/helpers/template.py:2082: RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited
    def wrapper(*args, **kwargs):
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

* Increase litejet press tests with a factor 10

The times are simulated anyway, and we can't stop the normal
event from occuring.

* Use async handlers for aiohttp

tests/components/motioneye/test_camera.py::test_get_still_image_from_camera
tests/components/motioneye/test_camera.py::test_get_still_image_from_camera
tests/components/motioneye/test_camera.py::test_get_stream_from_camera
tests/components/motioneye/test_camera.py::test_get_stream_from_camera
tests/components/motioneye/test_camera.py::test_camera_option_stream_url_template
tests/components/motioneye/test_camera.py::test_camera_option_stream_url_template
  /Users/joakim/src/hass/home-assistant/venv/lib/python3.9/site-packages/aiohttp/web_urldispatcher.py:189: DeprecationWarning: Bare functions are deprecated, use async ones
    warnings.warn(

* Switch to freezegun in modbus tests

The tests allowed clock to tick in between steps

* Make sure skybell object are fully mocked

Old tests would trigger attempts to post to could services:

```
DEBUG:aioskybell:HTTP post https://cloud.myskybell.com/api/v3/login/ Request with headers: {'content-type': 'application/json', 'accept': '*/*', 'x-skybell-app-id': 'd2b542c7-a7e4-4e1e-b77d-2b76911c7c46', 'x-skybell-client-id': '1f36a3c0-6dee-4997-a6db-4e1c67338e57'}
```

* Fix sorting that broke after rebase
2022-11-29 22:36:36 +01:00
uvjustin 9390359fe3 Bump httpx to 0.23.1 (#82725) 2022-11-26 10:04:22 -10:00
Marc Mueller 8f33ad38cf Update pylint to 2.15.6 (#82440)
* Update pylint to 2.15.6

* Use single pylint disable

* Use implicit dict constructor
2022-11-21 08:58:45 +01:00
Marc Mueller 2ac2a288cc Update mypy to 0.991 (#82096) 2022-11-14 21:16:44 +01:00
Marc Mueller 0c8eeaa643 Update mypy to 0.990 (#81783)
* Update mypy to 0.990

* Remove type ignore - overriding attr with property (13475)

* Remove type ignores - hasattr (13544)

* Adjust type ignore - assignment (13549)

* New error code - type-abstract (13785)

* Disable annotation-unchecked (13851)
2022-11-08 14:41:39 +01:00
Franck Nijhof be68412c64 Update pytest to 7.2.0 (#81295) 2022-10-31 13:26:05 +01:00
Marc Mueller 7714ce7235 Update pylint to 2.15.5 (#80759) 2022-10-22 00:07:23 +02:00
Marc Mueller d78c2a31a1 Update pylint to 2.15.4 (#80612) 2022-10-20 08:59:06 +02:00
Franck Nijhof 503b765108 Update freezegun to 1.2.2 (#80498) 2022-10-18 11:42:01 +03:00
Marc Mueller 42de69b6d5 Update mypy to 0.982 (#79560) 2022-10-03 23:21:53 +02:00
Marc Mueller e8156adb13 Update mypy to 0.981 (#79115) 2022-09-26 16:10:06 -04:00
Franck Nijhof 69ca055fd8 Update requests_mock to 1.10.0 (#78510) 2022-09-15 14:33:12 +02:00
Franck Nijhof 19c1065387 Update pytest to 7.1.3 (#78503) 2022-09-15 11:53:40 +02:00
Franck Nijhof ec2afd2bce Update pipdeptree to 2.3.1 (#78497) 2022-09-15 10:24:18 +02:00
Marc Mueller 7f8e2fa5d4 Pin astroid to fix pylint (#77862) 2022-09-05 17:39:42 -04:00
Marc Mueller 1210897f83 Update pylint to 2.15.0 (#77408)
* Update pylint to 2.15.0

* Remove useless suppressions

* Fix TypeVar name
2022-08-28 21:14:09 +02:00
Franck Nijhof 6e9c67c203 Update coverage to 6.4.4 (#76907) 2022-08-18 10:52:55 +02:00
Marc Mueller f400a404cd Update pylint to 2.14.5 (#76821) 2022-08-15 23:27:08 +02:00
Franck Nijhof f67a45f643 Update coverage to 6.4.3 (#76443) 2022-08-08 16:16:40 +02:00
Marc Mueller e02a24529f Update mypy to 0.971 (#75450) 2022-07-19 18:53:19 +02:00
Franck Nijhof d40978742c Update coverage to 6.4.2 (#75072) 2022-07-12 20:46:04 +02:00
Franck Nijhof ef025bccc0 Update tqdm to 4.64.0 (#75010) 2022-07-11 23:30:48 +02:00
Franck Nijhof 81f74d2053 Update pre-commit to 2.20.0 (#74955) 2022-07-11 10:42:23 +02:00
Franck Nijhof 9ff77e0fa1 Update pytest-sugar is 0.9.5 (#74931) 2022-07-11 00:06:45 +02:00
Franck Nijhof 70ceccb06a Update respx to 0.19.2 (#74878) 2022-07-10 14:21:14 +02:00
Ville SkyttäandJ. Nick Koston dd6725b80a Replace pylint-strict-informational with fail-on=I (#74311)
`fail-on` is available since pylint 2.9.0.

https://pylint.pycqa.org/en/latest/user_guide/configuration/all-options.html#fail-on
https://github.com/PyCQA/pylint/issues/3251#issuecomment-1170941337

Co-authored-by: J. Nick Koston <nick@koston.org>
2022-07-04 23:04:56 +02:00
Marc Mueller 42d7f2a3b2 Update pylint to 2.14.4 (#74192) 2022-06-30 08:56:43 +02:00
Franck Nijhof 42533ebbb3 Update requests to 2.28.1 (#74210) 2022-06-29 20:40:58 -05:00
Marc Mueller 24bf42cfbe Update pylint to 2.14.3 (#73703) 2022-06-19 16:29:57 +02:00
Franck Nijhof 99db2a5afe Update requests to 2.28.0 (#73406)
* Update requests to 2.28.0

* Fix mypy warning

* Fix Facebook messenger tests
2022-06-14 12:21:32 +02:00
Franck Nijhof f0a5dbacf8 Update pytest to 7.1.2 (#73417) 2022-06-12 20:48:17 -07:00
Franck Nijhof 23e17c5b47 Update coverage to 6.4.1 (#73405) 2022-06-12 20:17:58 -07:00
Marc Mueller a8763d7479 Update pylint to 2.14.1 (#73144) 2022-06-07 07:57:41 +02:00
Marc Mueller caed0a486f Update mypy to 0.961 (#73142) 2022-06-06 22:03:52 +02:00
Marc Mueller 983a76a91c Update pylint to 2.14.0 (#73119) 2022-06-06 21:43:47 +02:00
Marc Mueller 1ac71455cb Move remaining metadata to pyproject (#72469) 2022-05-26 02:54:49 +02:00
Marc Mueller 3c246b7800 Update mypy to 0.960 (#72481) 2022-05-25 11:42:14 -07:00
Franck Nijhof b2e18682d2 Update coverage to 6.4 (#72347) 2022-05-24 16:31:03 +02:00
Marc Mueller 2d7723169a Update pylint to 2.13.9 (#71941)
* Update pylint to 2.13.9

* Small change
2022-05-16 15:01:31 +02:00
Franck Nijhof 2e568771a9 Update coverage to 6.3.3 (#71772) 2022-05-13 11:16:56 +03:00
Franck NijhofandShay Levy 5430b51358 Update pre-commit to 2.19.0 (#71592)
Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-05-09 23:19:22 +03:00
Marc Mueller 6eef3c16f2 Update pylint to 2.13.8 (#71280) 2022-05-04 12:14:24 +02:00
Marc MuellerandJ. Nick Koston 93cbb331e5 Update Mypy to 0.950 (#70948)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-04-27 20:49:54 -05:00
Erik MontnemeryandJ. Nick Koston f96c1136b0 Bump pytest-socket to 0.5.1 (#69624)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-04-26 10:42:37 -10:00
Marc Mueller 90dab235f7 Update pylint to 2.13.7 (#70381)
* Update pylint to 2.13.7

* Spelling

* Remove old pylint config value

* Code updates
2022-04-21 13:02:52 -07:00
Franck Nijhof f9450d32ea Update pytest-cov to 3.0.0 (#68611) 2022-04-18 16:31:28 +02:00
Marc Mueller e407960f68 Update pylint to 2.13.5 (#69989) 2022-04-13 18:36:05 +02:00
Marc Mueller fa33ac73f3 Update pylint to 2.13.3 (#68904) 2022-03-30 09:18:55 -07:00
Marc Mueller 53110f8cb7 Update pylint to 2.13.2 (#68704) 2022-03-27 16:08:24 +02:00
Marc Mueller 53245c6523 Update pylint to 2.13.0 (#68656) 2022-03-25 15:14:48 -07:00