repo_id stringclasses 400
values | commit_sha stringclasses 400
values | commit_index int32 0 951 | in_repo_split stringclasses 1
value | cross_repo_split stringclasses 1
value | test_file stringlengths 7 121 | test_function stringlengths 1 108 | assertion_type stringclasses 32
values | difficulty stringclasses 8
values | context_lines int32 3 600 | prefix large_stringlengths 44 113k | target large_stringlengths 1 498 | anchor_sha stringclasses 400
values | anchor_index int32 0 951 | qna_source stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/integration/test_integration_setup.py | test_integration_setup_with_custom_updater | assert | string_literal | 34 | import sys
from unittest.mock import MagicMock, patch
from homeassistant.components.websocket_api import DOMAIN as WEBSOCKET_DOMAIN
from homeassistant.core import HomeAssistant
import pytest
from custom_components.hacs.base import HacsBase
from tests.common import create_config_entry, get_hacs
from tests.conftest im... | "constrains" | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/integration/test_integration_setup.py | test_integration_setup | assert_* | collection | 28 | import sys
from unittest.mock import MagicMock, patch
from homeassistant.components.websocket_api import DOMAIN as WEBSOCKET_DOMAIN
from homeassistant.core import HomeAssistant
import pytest
from custom_components.hacs.base import HacsBase
from tests.common import create_config_entry, get_hacs
from tests.conftest im... | { "websocket_commands": [ command for command in hass.data[WEBSOCKET_DOMAIN] if command.startswith("hacs/") ], }) | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_download_repository.py | test_download_repository | assert | numeric_literal | 29 | from typing import Generator
from homeassistant.core import HomeAssistant
import pytest
from tests.common import (
CategoryTestData,
WSClient,
category_test_data_parametrized,
get_hacs,
)
from tests.conftest import SnapshotFixture
@pytest.mark.parametrize("category_test_data", category_test_data_para... | 1 | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_download_repository.py | test_download_repository | assert | numeric_literal | 39 | from typing import Generator
from homeassistant.core import HomeAssistant
import pytest
from tests.common import (
CategoryTestData,
WSClient,
category_test_data_parametrized,
get_hacs,
)
from tests.conftest import SnapshotFixture
@pytest.mark.parametrize("category_test_data", category_test_data_para... | 2 | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_download_repository.py | test_download_repository | assert | none_literal | 26 | from typing import Generator
from homeassistant.core import HomeAssistant
import pytest
from tests.common import (
CategoryTestData,
WSClient,
category_test_data_parametrized,
get_hacs,
)
from tests.conftest import SnapshotFixture
@pytest.mark.parametrize("category_test_data", category_test_data_para... | None | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_download_repository.py | test_download_repository | assert | bool_literal | 37 | from typing import Generator
from homeassistant.core import HomeAssistant
import pytest
from tests.common import (
CategoryTestData,
WSClient,
category_test_data_parametrized,
get_hacs,
)
from tests.conftest import SnapshotFixture
@pytest.mark.parametrize("category_test_data", category_test_data_para... | True | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_get_documentation.py | test_validate_repository | assert | variable | 38 | from typing import Any
import pytest
from custom_components.hacs.base import HacsBase
from custom_components.hacs.repositories.base import HacsRepository
from tests.common import ResponseMocker, client_session_proxy
@pytest.mark.parametrize(
"data,result",
[
({"installed": True, "installed_version":... | docs | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_get_documentation.py | test_validate_repository | assert | none_literal | 40 | from typing import Any
import pytest
from custom_components.hacs.base import HacsBase
from custom_components.hacs.repositories.base import HacsRepository
from tests.common import ResponseMocker, client_session_proxy
@pytest.mark.parametrize(
"data,result",
[
({"installed": True, "installed_version":... | None | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_get_hacs_json.py | test_validate_repository | assert | variable | 23 | import pytest
from custom_components.hacs.base import HacsBase
from custom_components.hacs.repositories.base import HacsRepository
from tests.common import ResponseMocker, client_session_proxy
@pytest.mark.parametrize("version,name", [("1.0.0", "Integration basic 1.0.0"), ("99.99.99", None)])
async def test_validate... | name | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_get_hacs_json.py | test_validate_repository | assert | none_literal | 25 | import pytest
from custom_components.hacs.base import HacsBase
from custom_components.hacs.repositories.base import HacsRepository
from tests.common import ResponseMocker, client_session_proxy
@pytest.mark.parametrize("version,name", [("1.0.0", "Integration basic 1.0.0"), ("99.99.99", None)])
async def test_validate... | None | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_hacs_manifest.py | test_manifest_structure | assert | none_literal | 22 | import pytest
from custom_components.hacs.exceptions import HacsException
from custom_components.hacs.repositories.base import HacsManifest
def test_manifest_structure():
manifest = HacsManifest.from_dict({"name": "TEST"})
assert isinstance(manifest.manifest, dict)
assert isinstance(manifest.name, str)
... | None | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_hacs_manifest.py | test_manifest_structure | assert | string_literal | 13 | import pytest
from custom_components.hacs.exceptions import HacsException
from custom_components.hacs.repositories.base import HacsManifest
def test_manifest_structure():
manifest = HacsManifest.from_dict({"name": "TEST"})
assert isinstance(manifest.manifest, dict)
assert isinstance(manifest.name, str)
... | "TEST" | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_hacs_manifest.py | test_edge_pass_none | pytest.raises | variable | 8 | import pytest
from custom_components.hacs.exceptions import HacsException
from custom_components.hacs.repositories.base import HacsManifest
def test_edge_pass_none():
with pytest.raises( | HacsException) | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_register_repository.py | test_register_repository_failures | assert | numeric_literal | 64 | from typing import Generator
from homeassistant.core import HomeAssistant
from homeassistant.helpers.dispatcher import async_dispatcher_connect
import pytest
from custom_components.hacs.enums import HacsCategory, HacsDispatchEvent
from tests.common import WSClient, get_hacs, recursive_remove_key, safe_json_dumps
fro... | 1 | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_register_repository.py | test_register_repository_failures | assert | collection | 63 | from typing import Generator
from homeassistant.core import HomeAssistant
from homeassistant.helpers.dispatcher import async_dispatcher_connect
import pytest
from custom_components.hacs.enums import HacsCategory, HacsDispatchEvent
from tests.common import WSClient, get_hacs, recursive_remove_key, safe_json_dumps
fro... | {} | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_register_repository.py | test_register_repository | assert | none_literal | 30 | from typing import Generator
from homeassistant.core import HomeAssistant
from homeassistant.helpers.dispatcher import async_dispatcher_connect
import pytest
from custom_components.hacs.enums import HacsCategory, HacsDispatchEvent
from tests.common import WSClient, get_hacs, recursive_remove_key, safe_json_dumps
fro... | None | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_register_repository.py | test_register_repository | assert | bool_literal | 35 | from typing import Generator
from homeassistant.core import HomeAssistant
from homeassistant.helpers.dispatcher import async_dispatcher_connect
import pytest
from custom_components.hacs.enums import HacsCategory, HacsDispatchEvent
from tests.common import WSClient, get_hacs, recursive_remove_key, safe_json_dumps
fro... | True | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_register_repository.py | test_register_repository | assert_* | string_literal | 44 | from typing import Generator
from homeassistant.core import HomeAssistant
from homeassistant.helpers.dispatcher import async_dispatcher_connect
import pytest
from custom_components.hacs.enums import HacsCategory, HacsDispatchEvent
from tests.common import WSClient, get_hacs, recursive_remove_key, safe_json_dumps
fro... | f"{repository_full_name}/test_register_repository.json") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_remove_repository.py | test_remove_repository | assert | numeric_literal | 32 | import os
from pathlib import Path
from typing import Generator
from homeassistant.core import HomeAssistant
import pytest
from tests.common import (
CategoryTestData,
WSClient,
category_test_data_parametrized,
get_hacs,
)
from tests.conftest import SnapshotFixture
@pytest.mark.parametrize("category_... | 2 | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_remove_repository.py | test_remove_repository | assert | numeric_literal | 53 | import os
from pathlib import Path
from typing import Generator
from homeassistant.core import HomeAssistant
import pytest
from tests.common import (
CategoryTestData,
WSClient,
category_test_data_parametrized,
get_hacs,
)
from tests.conftest import SnapshotFixture
@pytest.mark.parametrize("category_... | 1 | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_remove_repository.py | test_remove_repository | assert | none_literal | 28 | import os
from pathlib import Path
from typing import Generator
from homeassistant.core import HomeAssistant
import pytest
from tests.common import (
CategoryTestData,
WSClient,
category_test_data_parametrized,
get_hacs,
)
from tests.conftest import SnapshotFixture
@pytest.mark.parametrize("category_... | None | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_remove_repository.py | test_remove_repository | assert | bool_literal | 51 | import os
from pathlib import Path
from typing import Generator
from homeassistant.core import HomeAssistant
import pytest
from tests.common import (
CategoryTestData,
WSClient,
category_test_data_parametrized,
get_hacs,
)
from tests.conftest import SnapshotFixture
@pytest.mark.parametrize("category_... | True | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_remove_repository.py | test_remove_repository | assert | bool_literal | 29 | import os
from pathlib import Path
from typing import Generator
from homeassistant.core import HomeAssistant
import pytest
from tests.common import (
CategoryTestData,
WSClient,
category_test_data_parametrized,
get_hacs,
)
from tests.conftest import SnapshotFixture
@pytest.mark.parametrize("category_... | False | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_removed_repository.py | test_removed_repository | assert | variable | 27 | import pytest
from custom_components.hacs.base import RemovedRepository
BASE_DATA = {
"repository": "remmoved/repository",
"reason": None,
"link": None,
"removal_type": None,
"acknowledged": False,
}
@pytest.mark.parametrize(
"data",
(
{"removal_type": "remove"},
{"reason"... | BASE_DATA | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_removed_repository.py | test_removed_repository | assert | collection | 29 | import pytest
from custom_components.hacs.base import RemovedRepository
BASE_DATA = {
"repository": "remmoved/repository",
"reason": None,
"link": None,
"removal_type": None,
"acknowledged": False,
}
@pytest.mark.parametrize(
"data",
(
{"removal_type": "remove"},
{"reason"... | {**BASE_DATA, **data} | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_update_repository.py | test_update_repository_entity | assert | none_literal | 33 | import json
import re
from typing import Generator
from unittest.mock import patch
from homeassistant.core import HomeAssistant, HomeAssistantError
from homeassistant.helpers.entity_registry import async_get as async_get_entity_registry
import pytest
from custom_components.hacs.const import DOMAIN
from tests.common ... | None | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_update_repository.py | test_update_repository_websocket | assert | bool_literal | 43 | import json
import re
from typing import Generator
from unittest.mock import patch
from homeassistant.core import HomeAssistant, HomeAssistantError
from homeassistant.helpers.entity_registry import async_get as async_get_entity_registry
import pytest
from custom_components.hacs.const import DOMAIN
from tests.common ... | True | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_update_repository.py | test_update_repository_entity | assert | complex_expr | 55 | import json
import re
from typing import Generator
from unittest.mock import patch
from homeassistant.core import HomeAssistant, HomeAssistantError
from homeassistant.helpers.entity_registry import async_get as async_get_entity_registry
import pytest
from custom_components.hacs.const import DOMAIN
from tests.common ... | category_test_data["version_update"] | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_update_repository.py | test_update_repository_entity | assert_* | string_literal | 57 | import json
import re
from typing import Generator
from unittest.mock import patch
from homeassistant.core import HomeAssistant, HomeAssistantError
from homeassistant.helpers.entity_registry import async_get as async_get_entity_registry
import pytest
from custom_components.hacs.const import DOMAIN
from tests.common ... | f"{category_test_data['repository']}/test_update_repository_entity.json") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_update_repository.py | test_update_repository_websocket | assert_* | string_literal | 46 | import json
import re
from typing import Generator
from unittest.mock import patch
from homeassistant.core import HomeAssistant, HomeAssistantError
from homeassistant.helpers.entity_registry import async_get as async_get_entity_registry
import pytest
from custom_components.hacs.const import DOMAIN
from tests.common ... | f"{category_test_data['repository']}/test_update_repository_websocket.json") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_update_repository.py | test_update_repository_entity_old_hacs_version | pytest.raises | complex_expr | 52 | import json
import re
from typing import Generator
from unittest.mock import patch
from homeassistant.core import HomeAssistant, HomeAssistantError
from homeassistant.helpers.entity_registry import async_get as async_get_entity_registry
import pytest
from custom_components.hacs.const import DOMAIN
from tests.common ... | HomeAssistantError, match="This version requires HACS 9999.99.99 or newer.") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_update_repository.py | test_update_repository_entity_no_version_and_cant_download | pytest.raises | complex_expr | 49 | import json
import re
from typing import Generator
from unittest.mock import patch
from homeassistant.core import HomeAssistant, HomeAssistantError
from homeassistant.helpers.entity_registry import async_get as async_get_entity_registry
import pytest
from custom_components.hacs.const import DOMAIN
from tests.common ... | HomeAssistantError, match="This integration is not available for download.") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_update_repository.py | test_update_repository_entity_old_core_version | pytest.raises | complex_expr | 52 | import json
import re
from typing import Generator
from unittest.mock import patch
from homeassistant.core import HomeAssistant, HomeAssistantError
from homeassistant.helpers.entity_registry import async_get as async_get_entity_registry
import pytest
from custom_components.hacs.const import DOMAIN
from tests.common ... | HomeAssistantError, match="This version requires Home Assistant 9999.99.99 or newer.") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_update_repository.py | test_update_repository_entity_no_manifest | pytest.raises | complex_expr | 52 | import json
import re
from typing import Generator
from unittest.mock import patch
from homeassistant.core import HomeAssistant, HomeAssistantError
from homeassistant.helpers.entity_registry import async_get as async_get_entity_registry
import pytest
from custom_components.hacs.const import DOMAIN
from tests.common ... | HomeAssistantError, match="The version 3.0.0 for this integration can not be used with HACS.") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/repositories/test_update_repository.py | test_update_repository_entity_download_failure | pytest.raises | func_call | 56 | import json
import re
from typing import Generator
from unittest.mock import patch
from homeassistant.core import HomeAssistant, HomeAssistantError
from homeassistant.helpers.entity_registry import async_get as async_get_entity_registry
import pytest
from custom_components.hacs.const import DOMAIN
from tests.common ... | HomeAssistantError, match=re.escape( "Downloading hacs-test-org/integration-basic with version 2.0.0 failed with (Could not download, see log for details)" )) | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/scripts/data/test_generate_category_data.py | test_generate_category_data | assert_* | string_literal | 42 | import json
from homeassistant.core import HomeAssistant
import pytest
from scripts.data.generate_category_data import OUTPUT_DIR, generate_category_data
from tests.common import (
CategoryTestData,
MockedResponse,
ResponseMocker,
category_test_data_parametrized,
recursive_remove_key,
safe_js... | f"scripts/data/generate_category_data/{category_test_data['category']}//data.json") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/scripts/data/test_generate_category_data.py | test_generate_category_data | assert_* | string_literal | 50 | import json
from homeassistant.core import HomeAssistant
import pytest
from scripts.data.generate_category_data import OUTPUT_DIR, generate_category_data
from tests.common import (
CategoryTestData,
MockedResponse,
ResponseMocker,
category_test_data_parametrized,
recursive_remove_key,
safe_js... | f"scripts/data/generate_category_data/{category_test_data['category']}/repositories.json") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/scripts/data/test_generate_category_data.py | test_generate_category_data_single_repository | assert_* | string_literal | 42 | import json
from homeassistant.core import HomeAssistant
import pytest
from scripts.data.generate_category_data import OUTPUT_DIR, generate_category_data
from tests.common import (
CategoryTestData,
MockedResponse,
ResponseMocker,
category_test_data_parametrized,
recursive_remove_key,
safe_js... | f"scripts/data/generate_category_data/single/{category_test_data['category']}/{category_test_data['repository']}/data.json") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/scripts/data/test_generate_category_data.py | test_generate_category_data_single_repository | assert_* | string_literal | 50 | import json
from homeassistant.core import HomeAssistant
import pytest
from scripts.data.generate_category_data import OUTPUT_DIR, generate_category_data
from tests.common import (
CategoryTestData,
MockedResponse,
ResponseMocker,
category_test_data_parametrized,
recursive_remove_key,
safe_js... | f"scripts/data/generate_category_data/single/{category_test_data['category']}/{category_test_data['repository']}/repositories.json") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_config_flow.py | test_options_flow | assert | variable | 81 | import asyncio
from typing import Generator
from unittest.mock import patch
from aiogithubapi import GitHubException
from freezegun.api import FrozenDateTimeFactory
from homeassistant import config_entries
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.core import HomeAssistant
from homeassistant... | val | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_config_flow.py | test_full_user_flow_implementation | assert | string_literal | 77 | import asyncio
from typing import Generator
from unittest.mock import patch
from aiogithubapi import GitHubException
from freezegun.api import FrozenDateTimeFactory
from homeassistant import config_entries
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.core import HomeAssistant
from homeassistant... | "user" | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_config_flow.py | test_full_user_flow_implementation | assert | string_literal | 104 | import asyncio
from typing import Generator
from unittest.mock import patch
from aiogithubapi import GitHubException
from freezegun.api import FrozenDateTimeFactory
from homeassistant import config_entries
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.core import HomeAssistant
from homeassistant... | "device" | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_config_flow.py | test_flow_with_remove_while_activating | pytest.raises | variable | 97 | import asyncio
from typing import Generator
from unittest.mock import patch
from aiogithubapi import GitHubException
from freezegun.api import FrozenDateTimeFactory
from homeassistant import config_entries
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.core import HomeAssistant
from homeassistant... | UnknownFlow) | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_config_flow.py | test_full_user_flow_implementation | assert | collection | 91 | import asyncio
from typing import Generator
from unittest.mock import patch
from aiogithubapi import GitHubException
from freezegun.api import FrozenDateTimeFactory
from homeassistant import config_entries
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.core import HomeAssistant
from homeassistant... | {"base": "acc"} | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_config_flow.py | test_options_flow | assert | collection | 64 | import asyncio
from typing import Generator
from unittest.mock import patch
from aiogithubapi import GitHubException
from freezegun.api import FrozenDateTimeFactory
from homeassistant import config_entries
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.core import HomeAssistant
from homeassistant... | {"token": TOKEN} | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_config_flow.py | test_full_user_flow_implementation | assert | complex_expr | 78 | import asyncio
from typing import Generator
from unittest.mock import patch
from aiogithubapi import GitHubException
from freezegun.api import FrozenDateTimeFactory
from homeassistant import config_entries
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.core import HomeAssistant
from homeassistant... | FlowResultType.FORM | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_config_flow.py | test_flow_with_registration_failure | assert | complex_expr | 67 | import asyncio
from typing import Generator
from unittest.mock import patch
from aiogithubapi import GitHubException
from freezegun.api import FrozenDateTimeFactory
from homeassistant import config_entries
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.core import HomeAssistant
from homeassistant... | FlowResultType.ABORT | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_data_client.py | test_discard_invalid_repo_data | assert | string_literal | 65 | import asyncio
from contextlib import nullcontext as does_not_raise
from types import NoneType
from typing import ContextManager
from homeassistant.core import HomeAssistant
import pytest
from custom_components.hacs.base import HacsBase
from custom_components.hacs.exceptions import HacsException, HacsNotModifiedExcep... | "running" | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_data_client.py | test_basic_functionality_data_validate | assert_* | string_literal | 64 | import asyncio
from contextlib import nullcontext as does_not_raise
from types import NoneType
from typing import ContextManager
from homeassistant.core import HomeAssistant
import pytest
from custom_components.hacs.base import HacsBase
from custom_components.hacs.exceptions import HacsException, HacsNotModifiedExcep... | f"data_client/base/data_validate/{category}.json") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_data_client.py | test_discard_invalid_repo_data | assert_* | string_literal | 68 | import asyncio
from contextlib import nullcontext as does_not_raise
from types import NoneType
from typing import ContextManager
from homeassistant.core import HomeAssistant
import pytest
from custom_components.hacs.base import HacsBase
from custom_components.hacs.exceptions import HacsException, HacsNotModifiedExcep... | f"{repository}/test_discard_invalid_repo_data.json") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_data_client.py | test_basic_functionality_data | assert_* | string_literal | 34 | import asyncio
from contextlib import nullcontext as does_not_raise
from types import NoneType
from typing import ContextManager
from homeassistant.core import HomeAssistant
import pytest
from custom_components.hacs.base import HacsBase
from custom_components.hacs.exceptions import HacsException, HacsNotModifiedExcep... | f"data_client/base/data/{category_test_data['category']}.json") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_data_client.py | test_basic_functionality_repositories | assert_* | string_literal | 34 | import asyncio
from contextlib import nullcontext as does_not_raise
from types import NoneType
from typing import ContextManager
from homeassistant.core import HomeAssistant
import pytest
from custom_components.hacs.base import HacsBase
from custom_components.hacs.exceptions import HacsException, HacsNotModifiedExcep... | f"data_client/base/repositories/{category_test_data['category']}.json") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_diagnostics.py | test_diagnostics | assert | func_call | 20 | from custom_components.hacs.base import HacsBase
from custom_components.hacs.diagnostics import async_get_config_entry_diagnostics
from tests.common import (
TOKEN,
MockedResponse,
ResponseMocker,
recursive_remove_key,
safe_json_dumps,
)
from tests.conftest import SnapshotFixture
async def test_di... | str(diagnostics) | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_diagnostics.py | test_diagnostics | assert_* | string_literal | 21 | from custom_components.hacs.base import HacsBase
from custom_components.hacs.diagnostics import async_get_config_entry_diagnostics
from tests.common import (
TOKEN,
MockedResponse,
ResponseMocker,
recursive_remove_key,
safe_json_dumps,
)
from tests.conftest import SnapshotFixture
async def test_di... | "diagnostics/base.json") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_diagnostics.py | test_diagnostics_with_exception | assert_* | string_literal | 26 | from custom_components.hacs.base import HacsBase
from custom_components.hacs.diagnostics import async_get_config_entry_diagnostics
from tests.common import (
TOKEN,
MockedResponse,
ResponseMocker,
recursive_remove_key,
safe_json_dumps,
)
from tests.conftest import SnapshotFixture
async def test_di... | "diagnostics/exception.json") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_emuns.py | test_enum_value | assert | string_literal | 6 | from custom_components.hacs.enums import RepositoryFile
def test_enum_value():
"""Test enum value."""
assert RepositoryFile.HACS_JSON == | "hacs.json" | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_system_health.py | test_system_health | assert_* | string_literal | 58 | import asyncio
from typing import Any, Generator
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component
import pytest
from custom_components.hacs.base import HacsBase
from tests.common import MockedResponse, ResponseMocker, safe_json_dumps
from tests.conftest import Snapsh... | "system_health/system_health.json") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_system_health.py | test_system_health_no_hacs | pytest.raises | complex_expr | 27 | import asyncio
from typing import Any, Generator
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component
import pytest
from custom_components.hacs.base import HacsBase
from tests.common import MockedResponse, ResponseMocker, safe_json_dumps
from tests.conftest import Snapsh... | KeyError, match=HACS_SYSTEM_HEALTH_DOMAIN) | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_system_health.py | test_system_health_after_unload | assert_* | string_literal | 33 | import asyncio
from typing import Any, Generator
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component
import pytest
from custom_components.hacs.base import HacsBase
from tests.common import MockedResponse, ResponseMocker, safe_json_dumps
from tests.conftest import Snapsh... | "system_health/system_health_after_unload.json") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_update.py | test_update_entity_state | assert | none_literal | 36 | import json as json_func
import os
from typing import Generator
from freezegun.api import FrozenDateTimeFactory
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_registry import async_get as async_get_entity_registry
import pytest
from custom_components.hacs.const import DOMAIN
from test... | None | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/test_update.py | test_update_entity_state | assert_* | string_literal | 87 | import json as json_func
import os
from typing import Generator
from freezegun.api import FrozenDateTimeFactory
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_registry import async_get as async_get_entity_registry
import pytest
from custom_components.hacs.const import DOMAIN
from test... | f"{category_test_data['repository']}/test_update_entity_state.json") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_fs_util.py | test_async_remove | pytest.raises | variable | 14 | from contextlib import nullcontext as does_not_raise
import os
import pytest
from custom_components.hacs.utils.file_system import async_exists, async_remove
from tests.common import fixture
async def test_async_remove(hass, tmpdir):
"""Test async_remove."""
assert not await async_exists(hass, tmpdir / "tmpt... | FileNotFoundError) | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_queue_manager.py | test_queue_manager | assert | numeric_literal | 18 | from unittest.mock import AsyncMock
import pytest
from custom_components.hacs.base import HacsBase
from custom_components.hacs.exceptions import HacsExecutionStillInProgress
from custom_components.hacs.utils.queue_manager import QueueManager
dummy_task = AsyncMock()
async def test_queue_manager(hacs: HacsBase, capl... | 0 | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_queue_manager.py | test_queue_manager | assert | numeric_literal | 23 | from unittest.mock import AsyncMock
import pytest
from custom_components.hacs.base import HacsBase
from custom_components.hacs.exceptions import HacsExecutionStillInProgress
from custom_components.hacs.utils.queue_manager import QueueManager
dummy_task = AsyncMock()
async def test_queue_manager(hacs: HacsBase, capl... | 1 | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_queue_manager.py | test_queue_manager | assert | numeric_literal | 28 | from unittest.mock import AsyncMock
import pytest
from custom_components.hacs.base import HacsBase
from custom_components.hacs.exceptions import HacsExecutionStillInProgress
from custom_components.hacs.utils.queue_manager import QueueManager
dummy_task = AsyncMock()
async def test_queue_manager(hacs: HacsBase, capl... | 5 | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_queue_manager.py | test_queue_manager | assert | numeric_literal | 32 | from unittest.mock import AsyncMock
import pytest
from custom_components.hacs.base import HacsBase
from custom_components.hacs.exceptions import HacsExecutionStillInProgress
from custom_components.hacs.utils.queue_manager import QueueManager
dummy_task = AsyncMock()
async def test_queue_manager(hacs: HacsBase, capl... | 4 | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_store.py | test_store_store | assert | numeric_literal | 33 | from unittest.mock import AsyncMock, patch
from homeassistant.core import HomeAssistant
import pytest
from custom_components.hacs.const import VERSION_STORAGE
from custom_components.hacs.exceptions import HacsException
from custom_components.hacs.utils.store import (
async_load_from_store,
async_remove_store,... | 1 | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_store.py | test_store_load | assert | none_literal | 29 | from unittest.mock import AsyncMock, patch
from homeassistant.core import HomeAssistant
import pytest
from custom_components.hacs.const import VERSION_STORAGE
from custom_components.hacs.exceptions import HacsException
from custom_components.hacs.utils.store import (
async_load_from_store,
async_remove_store,... | None | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_store.py | test_store_store | assert | complex_expr | 27 | from unittest.mock import AsyncMock, patch
from homeassistant.core import HomeAssistant
import pytest
from custom_components.hacs.const import VERSION_STORAGE
from custom_components.hacs.exceptions import HacsException
from custom_components.hacs.utils.store import (
async_load_from_store,
async_remove_store,... | caplog.text | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_store.py | test_store_load | pytest.raises | variable | 31 | from unittest.mock import AsyncMock, patch
from homeassistant.core import HomeAssistant
import pytest
from custom_components.hacs.const import VERSION_STORAGE
from custom_components.hacs.exceptions import HacsException
from custom_components.hacs.utils.store import (
async_load_from_store,
async_remove_store,... | HacsException) | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_store.py | test_store_load | assert | collection | 25 | from unittest.mock import AsyncMock, patch
from homeassistant.core import HomeAssistant
import pytest
from custom_components.hacs.const import VERSION_STORAGE
from custom_components.hacs.exceptions import HacsException
from custom_components.hacs.utils.store import (
async_load_from_store,
async_remove_store,... | {"test": "test"} | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_url.py | test_github_release_asset | assert | variable | 17 | import pytest
from custom_components.hacs.utils.url import github_archive, github_release_asset
@pytest.mark.parametrize(
"arguments,url",
(
(
{"repository": "owner/repo", "version": "1.0.0", "filename": "example.zip"},
"https://github.com/owner/repo/releases/download/1.0.0/exa... | url | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_validate.py | test_repo_data_json_schema_multiple_bad_data | assert | numeric_literal | 77 | from contextlib import nullcontext as does_not_raise
from awesomeversion import AwesomeVersion
import pytest
from voluptuous.error import Invalid, MultipleInvalid
from custom_components.hacs.utils.validate import (
HACS_MANIFEST_JSON_SCHEMA as hacs_json_schema,
INTEGRATION_MANIFEST_JSON_SCHEMA as integration_... | 3 | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_validate.py | test_integration_json_schema | assert | variable | 33 | from contextlib import nullcontext as does_not_raise
from awesomeversion import AwesomeVersion
import pytest
from voluptuous.error import Invalid, MultipleInvalid
from custom_components.hacs.utils.validate import (
HACS_MANIFEST_JSON_SCHEMA as hacs_json_schema,
INTEGRATION_MANIFEST_JSON_SCHEMA as integration_... | base_data | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_validate.py | test_repo_data_json_schema_multiple_bad_data | pytest.raises | variable | 74 | from contextlib import nullcontext as does_not_raise
from awesomeversion import AwesomeVersion
import pytest
from voluptuous.error import Invalid, MultipleInvalid
from custom_components.hacs.utils.validate import (
HACS_MANIFEST_JSON_SCHEMA as hacs_json_schema,
INTEGRATION_MANIFEST_JSON_SCHEMA as integration_... | MultipleInvalid) | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_validate.py | test_repo_data_json_schema_multiple_bad_data | assert | variable | 78 | from contextlib import nullcontext as does_not_raise
from awesomeversion import AwesomeVersion
import pytest
from voluptuous.error import Invalid, MultipleInvalid
from custom_components.hacs.utils.validate import (
HACS_MANIFEST_JSON_SCHEMA as hacs_json_schema,
INTEGRATION_MANIFEST_JSON_SCHEMA as integration_... | expected_errors_1 | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_validate.py | test_integration_json_schema | assert | func_call | 32 | from contextlib import nullcontext as does_not_raise
from awesomeversion import AwesomeVersion
import pytest
from voluptuous.error import Invalid, MultipleInvalid
from custom_components.hacs.utils.validate import (
HACS_MANIFEST_JSON_SCHEMA as hacs_json_schema,
INTEGRATION_MANIFEST_JSON_SCHEMA as integration_... | AwesomeVersion(1.2) | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_validate.py | test_hacs_manufest_json_schema | pytest.raises | complex_expr | 81 | from contextlib import nullcontext as does_not_raise
from awesomeversion import AwesomeVersion
import pytest
from voluptuous.error import Invalid, MultipleInvalid
from custom_components.hacs.utils.validate import (
HACS_MANIFEST_JSON_SCHEMA as hacs_json_schema,
INTEGRATION_MANIFEST_JSON_SCHEMA as integration_... | Invalid, match="extra keys not allowed") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_validate.py | test_hacs_manufest_json_schema | pytest.raises | complex_expr | 84 | from contextlib import nullcontext as does_not_raise
from awesomeversion import AwesomeVersion
import pytest
from voluptuous.error import Invalid, MultipleInvalid
from custom_components.hacs.utils.validate import (
HACS_MANIFEST_JSON_SCHEMA as hacs_json_schema,
INTEGRATION_MANIFEST_JSON_SCHEMA as integration_... | Invalid, match="Value 'NOT_VALID' is not in") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_validate.py | test_integration_json_schema | pytest.raises | complex_expr | 35 | from contextlib import nullcontext as does_not_raise
from awesomeversion import AwesomeVersion
import pytest
from voluptuous.error import Invalid, MultipleInvalid
from custom_components.hacs.utils.validate import (
HACS_MANIFEST_JSON_SCHEMA as hacs_json_schema,
INTEGRATION_MANIFEST_JSON_SCHEMA as integration_... | Invalid, match="expected str for dictionary value") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_validate.py | test_hacs_manufest_json_schema | pytest.raises | complex_expr | 87 | from contextlib import nullcontext as does_not_raise
from awesomeversion import AwesomeVersion
import pytest
from voluptuous.error import Invalid, MultipleInvalid
from custom_components.hacs.utils.validate import (
HACS_MANIFEST_JSON_SCHEMA as hacs_json_schema,
INTEGRATION_MANIFEST_JSON_SCHEMA as integration_... | Invalid, match="Value 'False' is not a string or list.") | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_validate.py | test_hacs_manufest_json_schema | assert | collection | 32 | from contextlib import nullcontext as does_not_raise
from awesomeversion import AwesomeVersion
import pytest
from voluptuous.error import Invalid, MultipleInvalid
from custom_components.hacs.utils.validate import (
HACS_MANIFEST_JSON_SCHEMA as hacs_json_schema,
INTEGRATION_MANIFEST_JSON_SCHEMA as integration_... | { "name": "My awesome thing", "country": ["NO"], } | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_version.py | test_version_to_download | assert | string_literal | 17 | import pytest
from custom_components.hacs.utils import version
def test_version_to_download(repository):
"""Test version_to_download."""
repository.data.selected_tag = "main"
assert repository.version_to_download() == "main"
repository.data.default_branch = None
repository.data.last_version = Non... | "2" | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_version.py | test_version_to_download | assert | string_literal | 21 | import pytest
from custom_components.hacs.utils import version
def test_version_to_download(repository):
"""Test version_to_download."""
repository.data.selected_tag = "main"
assert repository.version_to_download() == "main"
repository.data.default_branch = None
repository.data.last_version = Non... | "3" | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_version.py | test_version_to_download | assert | none_literal | 38 | import pytest
from custom_components.hacs.utils import version
def test_version_to_download(repository):
"""Test version_to_download."""
repository.data.selected_tag = "main"
assert repository.version_to_download() == "main"
repository.data.default_branch = None
repository.data.last_version = Non... | None | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_version.py | test_version_left_higher_or_equal_then_right | assert | variable | 30 | import pytest
from custom_components.hacs.utils import version
@pytest.mark.parametrize(
"left, right, expected",
[
("1.0.0", "0.9.9", True),
("1", "0.9.9", True),
("1.1", "0.9.9", True),
("0.10.0", "0.9.9", True),
("0.0.10", "0.9.9", False),
("0.9.0", "0.9.9", ... | expected | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_workarounds.py | test_domain_ovverides | assert | none_literal | 6 | from custom_components.hacs.utils.workarounds import DOMAIN_OVERRIDES
def test_domain_ovverides() -> None:
assert DOMAIN_OVERRIDES.get("custom-components/sensor.custom_aftership") == "custom_aftership"
assert DOMAIN_OVERRIDES.get("awesome/repo") is | None | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/utils/test_workarounds.py | test_domain_ovverides | assert | string_literal | 5 | from custom_components.hacs.utils.workarounds import DOMAIN_OVERRIDES
def test_domain_ovverides() -> None:
assert DOMAIN_OVERRIDES.get("custom-components/sensor.custom_aftership") == | "custom_aftership" | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/validate/test_async_run_repository_checks.py | test_async_run_repository_checks | pytest.raises | variable | 21 | from unittest.mock import patch
import pytest
from custom_components.hacs.base import HacsBase
from custom_components.hacs.repositories.integration import HacsIntegrationRepository
from custom_components.hacs.validate.manager import ValidationManager
async def test_async_run_repository_checks(
hacs: HacsBase,
... | SystemExit) | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hacs/integration | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | train | train | tests/validate/test_hacsjson_check.py | test_hacs_manifest_with_missing_filename | assert | complex_expr | 23 | from aiogithubapi.objects.repository.content import AIOGitHubAPIRepositoryTreeContent
from custom_components.hacs.validate.hacsjson import Validator
test_tree = [
AIOGitHubAPIRepositoryTreeContent({"path": "hacs.json", "type": "file"}, "test/test", "main"),
AIOGitHubAPIRepositoryTreeContent({"path": "README.m... | caplog.text | 81e13db5a3ffd12e94d0a966bfeba3c30584205d | 233 | v2_extractor_at_anchor |
hbldh/bleak | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | train | train | tests/backends/bluezdbus/test_deprecated_imports.py | test_deprecated_OrPattern_import | assert | variable | 15 | import sys
import pytest
def test_deprecated_OrPattern_import():
with pytest.warns(
DeprecationWarning,
match="importing OrPattern from bleak.backends.bluezdbus.advertisement_monitor is deprecated",
) as recorder:
from bleak.backends.bluezdbus.advertisement_monitor import ( # noqa: F4... | __file__ | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | v2_extractor_at_anchor |
hbldh/bleak | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | train | train | tests/backends/bluezdbus/test_utils.py | test_device_path_from_characteristic_path | assert | string_literal | 12 | import sys
import pytest
def test_device_path_from_characteristic_path():
"""Test device_path_from_characteristic_path."""
from bleak.backends.bluezdbus.utils import ( # pylint: disable=import-outside-toplevel
device_path_from_characteristic_path,
)
assert | "/org/bluez/hci0/dev_11_22_33_44_55_66" | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | v2_extractor_at_anchor |
hbldh/bleak | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | train | train | tests/backends/bluezdbus/test_utils.py | test_device_path_from_characteristic_path | assert | string_literal | 19 | import sys
import pytest
def test_device_path_from_characteristic_path():
"""Test device_path_from_characteristic_path."""
from bleak.backends.bluezdbus.utils import ( # pylint: disable=import-outside-toplevel
device_path_from_characteristic_path,
)
assert (
device_path_from_characte... | "/org/bluez/hci10/dev_11_22_33_44_55_66" | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | v2_extractor_at_anchor |
hbldh/bleak | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | train | train | tests/backends/bluezdbus/test_version.py | test_bluez_version | assert | bool_literal | 38 | import sys
import pytest
from unittest.mock import AsyncMock, Mock
from bleak.backends.bluezdbus.version import BlueZFeatures
def reset_bluez_features(monkeypatch: pytest.MonkeyPatch) -> None:
"""Reset BlueZFeatures class variables to avoid side effects between tests."""
monkeypatch.setattr(BlueZFeatures, "... | True | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | v2_extractor_at_anchor |
hbldh/bleak | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | train | train | tests/backends/corebluetooth/test_deprecated_imports.py | test_deprecated_CBScannerArgs_import | assert | variable | 15 | import sys
import pytest
def test_deprecated_CBScannerArgs_import():
with pytest.warns(
DeprecationWarning,
match="importing CBScannerArgs from bleak.backends.corebluetooth.scanner is deprecated, use bleak.args.corebluetooth instead",
) as recorder:
from bleak.backends.corebluetooth.sc... | __file__ | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | v2_extractor_at_anchor |
hbldh/bleak | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | train | train | tests/backends/winrt/test_deprecated_imports.py | test_deprecated_WinRTClientArgs_import | assert | variable | 15 | import sys
import pytest
def test_deprecated_WinRTClientArgs_import():
with pytest.warns(
DeprecationWarning,
match="importing WinRTClientArgs from bleak.backends.winrt.client is deprecated, use bleak.args.winrt instead",
) as recorder:
from bleak.backends.winrt.client import ( # noqa... | __file__ | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | v2_extractor_at_anchor |
hbldh/bleak | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | train | train | tests/backends/winrt/test_utils.py | test_assert_mta_init_sta | pytest.raises | complex_expr | 44 | import sys
import pytest
from ctypes import windll, wintypes # type: ignore[attr-defined]
from bleak.backends.winrt.util import (
allow_sta,
assert_mta,
check_hresult,
uninitialize_sta,
)
from bleak.exc import BleakError
COINIT_MULTITHREADED = 0x0
COINIT_APARTMENTTHREADED = 0x2
_CoInitializeEx = w... | BleakError, match="Thread is configured for Windows GUI but callbacks are not working.") | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | v2_extractor_at_anchor |
hbldh/bleak | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | train | train | tests/integration/bluez_controller.py | wait_for_new_adapter | assert_* | variable | 110 | import sys
from typing import TYPE_CHECKING
import asyncio
import contextlib
import logging
from typing import AsyncGenerator
from bumble.controller import Controller
from bumble.link import LocalLink
from bumble.transport import open_transport
from bumble.transport.common import Transport
from dbus_fast import BusTy... | reply) | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | v2_extractor_at_anchor |
hbldh/bleak | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | train | train | tests/integration/test_cb_bluetooth_availability.py | test_bluetooth_availability | assert | variable | 112 | import sys
import pytest
from unittest.mock import Mock
from CoreBluetooth import (
CBManagerAuthorizationDenied,
CBManagerAuthorizationRestricted,
CBManagerStatePoweredOff,
CBManagerStateResetting,
CBManagerStateUnauthorized,
CBManagerStateUnknown,
CBManagerStateUnsupported,
)
from blea... | expected_reason | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | v2_extractor_at_anchor |
hbldh/bleak | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | train | train | tests/integration/test_cb_bluetooth_availability.py | test_bluetooth_availability | pytest.raises | complex_expr | 108 | import sys
import pytest
from unittest.mock import Mock
from CoreBluetooth import (
CBManagerAuthorizationDenied,
CBManagerAuthorizationRestricted,
CBManagerStatePoweredOff,
CBManagerStateResetting,
CBManagerStateUnauthorized,
CBManagerStateUnknown,
CBManagerStateUnsupported,
)
from blea... | BleakBluetoothNotAvailableError, match=expected_msg) | da97477ada52c8003a14b43c50432b512a7a4252 | 28 | v2_extractor_at_anchor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.