Add support for snapshot testing (#88323)

* Add support for snapshot testing

* Use snapshots in Elgato diagnostics test

* Use snapshots in Elgato sensor test

* Fix flake8 warning

* Slightly improve serialized output

* Remove snapshot naming in elgato sensor tests

* Improve snapshoting of via_device_id in device registry item

* Update pylint typehints plugin for snapshot fixture typing

* Use snapshots in Elgato configflow test

* Use snapshots in Bluetooth repair issue tests
This commit is contained in:
Franck Nijhof
2023-02-17 22:35:55 +01:00
committed by GitHub
parent 325674ec44
commit 6891eb7ed1
12 changed files with 837 additions and 176 deletions

View File

@@ -134,6 +134,7 @@ _TEST_FIXTURES: dict[str, list[str] | str] = {
"recorder_db_url": "str",
"recorder_mock": "Recorder",
"requests_mock": "requests_mock.Mocker",
"snapshot": "SnapshotAssertion",
"tmp_path": "Path",
}
_TEST_FUNCTION_MATCH = TypeHintMatch(