mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
Fix potential infinite loop if incomplete lists returned (#920)
Fixes the test framework to handle fixtures with incomplete lists better by checking for completeness and overriding the sum. Also adds a pytest-timeout dev dependency with timeout set to 10 seconds. Finally fixes smartprotocol to prevent an infinite loop if incomplete lists ever happens in the real world. Co-authored-by: Teemu R. <tpr@iki.fi>
This commit is contained in:
@@ -57,6 +57,7 @@ pytest-mock = "*"
|
||||
codecov = "*"
|
||||
xdoctest = "*"
|
||||
coverage = {version = "*", extras = ["toml"]}
|
||||
pytest-timeout = "^2"
|
||||
|
||||
[tool.poetry.extras]
|
||||
docs = ["sphinx", "sphinx_rtd_theme", "sphinxcontrib-programoutput", "myst-parser", "docutils"]
|
||||
@@ -89,6 +90,7 @@ markers = [
|
||||
"requires_dummy: test requires dummy data to pass, skipped on real devices",
|
||||
]
|
||||
asyncio_mode = "auto"
|
||||
timeout = 10
|
||||
|
||||
[tool.doc8]
|
||||
paths = ["docs"]
|
||||
|
Reference in New Issue
Block a user