forked from home-assistant-libs/aiohue
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic tests (home-assistant-libs#112)
- Loading branch information
Showing
12 changed files
with
2,176 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
flake8==4.0.1 | ||
black==22.1.0 | ||
pytest==7.0.1 | ||
pytest-aiohttp==1.0.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,6 @@ ignore = | |
W503, | ||
E203, | ||
D202 | ||
|
||
[tool:pytest] | ||
asyncio_mode = auto |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"""Common utilities for fixtures.""" | ||
import json | ||
import pathlib | ||
|
||
|
||
def load_fixture(name: str): | ||
"""Load a fixture from disk.""" | ||
path = pathlib.Path(__file__).parent / "fixtures" / name | ||
|
||
content = path.read_text() | ||
|
||
if name.endswith(".json"): | ||
return json.loads(content) | ||
|
||
return content |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.