1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Add return type to tests without arguments (#87613)

* Add return type to tests without arguments

* Black

* Cancel fixture amends
This commit is contained in:
epenet
2023-02-07 14:20:06 +01:00
committed by GitHub
parent fb4c0b4b7a
commit 4142f0d15d
99 changed files with 473 additions and 459 deletions

View File

@@ -237,7 +237,7 @@ async def test_async_get_user_site(mock_env_copy):
assert ret == os.path.join(deps_dir, "lib_dir")
def test_check_package_global():
def test_check_package_global() -> None:
"""Test for an installed package."""
first_package = list(pkg_resources.working_set)[0]
installed_package = first_package.project_name
@@ -250,12 +250,12 @@ def test_check_package_global():
assert not package.is_installed(f"{installed_package}<{installed_version}")
def test_check_package_zip():
def test_check_package_zip() -> None:
"""Test for an installed zip package."""
assert not package.is_installed(TEST_ZIP_REQ)
def test_get_distribution_falls_back_to_version():
def test_get_distribution_falls_back_to_version() -> None:
"""Test for get_distribution failing and fallback to version."""
first_package = list(pkg_resources.working_set)[0]
installed_package = first_package.project_name
@@ -272,7 +272,7 @@ def test_get_distribution_falls_back_to_version():
assert not package.is_installed(f"{installed_package}<{installed_version}")
def test_check_package_previous_failed_install():
def test_check_package_previous_failed_install() -> None:
"""Test for when a previously install package failed and left cruft behind."""
first_package = list(pkg_resources.working_set)[0]
installed_package = first_package.project_name