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
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/controller_test.py
test_get_list
assert
variable
51
from collections import defaultdict from typing import Any, Dict, List, Optional, Set, Union import appdaemon.plugins.hass.hassapi as hass import pytest from cx_const import ActionEvent from cx_core import integration as integration_module from cx_core.action_type import ActionsMapping from cx_core.action_type.base im...
expected
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/controller_test.py
test_call_service
assert_*
variable
44
from collections import defaultdict from typing import Any, Dict, List, Optional, Set, Union import appdaemon.plugins.hass.hassapi as hass import pytest from cx_const import ActionEvent from cx_core import integration as integration_module from cx_core.action_type import ActionsMapping from cx_core.action_type.base im...
service)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/controller_test.py
test_get_default_actions_mapping_throwing_error
pytest.raises
variable
42
from collections import defaultdict from typing import Any, Dict, List, Optional, Set, Union import appdaemon.plugins.hass.hassapi as hass import pytest from cx_const import ActionEvent from cx_core import integration as integration_module from cx_core.action_type import ActionsMapping from cx_core.action_type.base im...
ValueError)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/controller_test.py
test_get_multiple_click_actions
assert
func_call
58
from collections import defaultdict from typing import Any, Dict, List, Optional, Set, Union import appdaemon.plugins.hass.hassapi as hass import pytest from cx_const import ActionEvent from cx_core import integration as integration_module from cx_core.action_type import ActionsMapping from cx_core.action_type.base im...
set(expected)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/controller_test.py
test_handle_action
assert
variable
68
from collections import defaultdict from typing import Any, Dict, List, Optional, Set, Union import appdaemon.plugins.hass.hassapi as hass import pytest from cx_const import ActionEvent from cx_core import integration as integration_module from cx_core.action_type import ActionsMapping from cx_core.action_type.base im...
expected_calls
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/controller_test.py
test_action_decorator
assert_*
string_literal
46
from collections import defaultdict from typing import Any, Dict, List, Optional, Set, Union import appdaemon.plugins.hass.hassapi as hass import pytest from cx_const import ActionEvent from cx_core import integration as integration_module from cx_core.action_type import ActionsMapping from cx_core.action_type.base im...
"fake_action")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/controller_test.py
test_initialize
assert
variable
155
from collections import defaultdict from typing import Any, Dict, List, Optional, Set, Union import appdaemon.plugins.hass.hassapi as hass import pytest from cx_const import ActionEvent from cx_core import integration as integration_module from cx_core.action_type import ActionsMapping from cx_core.action_type.base im...
actions_output
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/controller_test.py
test_initialize
assert_*
variable
153
from collections import defaultdict from typing import Any, Dict, List, Optional, Set, Union import appdaemon.plugins.hass.hassapi as hass import pytest from cx_const import ActionEvent from cx_core import integration as integration_module from cx_core.action_type import ActionsMapping from cx_core.action_type.base im...
controller_id)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/controller_test.py
test_get_integration
assert_*
variable
63
from collections import defaultdict from typing import Any, Dict, List, Optional, Set, Union import appdaemon.plugins.hass.hassapi as hass import pytest from cx_const import ActionEvent from cx_core import integration as integration_module from cx_core.action_type import ActionsMapping from cx_core.action_type.base im...
args_expected)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/controller_test.py
test_get_default_actions_mapping_happyflow
assert
string_literal
42
from collections import defaultdict from typing import Any, Dict, List, Optional, Set, Union import appdaemon.plugins.hass.hassapi as hass import pytest from cx_const import ActionEvent from cx_core import integration as integration_module from cx_core.action_type import ActionsMapping from cx_core.action_type.base im...
"this_is_a_mapping"
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/controller_test.py
test_initialize
assert
func_call
154
from collections import defaultdict from typing import Any, Dict, List, Optional, Set, Union import appdaemon.plugins.hass.hassapi as hass import pytest from cx_const import ActionEvent from cx_core import integration as integration_module from cx_core.action_type import ActionsMapping from cx_core.action_type.base im...
len(controller_input)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/controller_test.py
test_get_integration
assert
variable
64
from collections import defaultdict from typing import Any, Dict, List, Optional, Set, Union import appdaemon.plugins.hass.hassapi as hass import pytest from cx_const import ActionEvent from cx_core import integration as integration_module from cx_core.action_type import ActionsMapping from cx_core.action_type.base im...
integration_name_expected
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/controller_test.py
test_call_action
assert_*
collection
76
from collections import defaultdict from typing import Any, Dict, List, Optional, Set, Union import appdaemon.plugins.hass.hassapi as hass import pytest from cx_const import ActionEvent from cx_core import integration as integration_module from cx_core.action_type import ActionsMapping from cx_core.action_type.base im...
{"action_key": action_key, "extra": None})
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/controller_test.py
test_get_default_actions_mapping_throwing_error
assert
string_literal
45
from collections import defaultdict from typing import Any, Dict, List, Optional, Set, Union import appdaemon.plugins.hass.hassapi as hass import pytest from cx_const import ActionEvent from cx_core import integration as integration_module from cx_core.action_type import ActionsMapping from cx_core.action_type.base im...
"This controller does not support integration-test."
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/custom_controller_test.py
test_custom_controllers
assert
variable
100
from typing import Any, Dict, List, Tuple, Type import pytest from _pytest.monkeypatch import MonkeyPatch from appdaemon.plugins.hass.hassapi import Hass from cx_const import PredefinedActionsMapping from cx_core import ( CallServiceController, CoverController, LightController, MediaPlayerController, ...
expected_calls
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/custom_controller_test.py
test_call_service_controller
assert_*
variable
86
from typing import Any, Dict, List, Tuple, Type import pytest from _pytest.monkeypatch import MonkeyPatch from appdaemon.plugins.hass.hassapi import Hass from cx_const import PredefinedActionsMapping from cx_core import ( CallServiceController, CoverController, LightController, MediaPlayerController, ...
expected_service)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/custom_controller_test.py
test_call_service_controller
assert
func_call
84
from typing import Any, Dict, List, Tuple, Type import pytest from _pytest.monkeypatch import MonkeyPatch from appdaemon.plugins.hass.hassapi import Hass from cx_const import PredefinedActionsMapping from cx_core import ( CallServiceController, CoverController, LightController, MediaPlayerController, ...
len(expected_calls)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/feature_support/feature_support_test.py
test_is_supported
assert
variable
27
import pytest from cx_core.feature_support import FeatureSupport from cx_core.type_controller import TypeController @pytest.mark.parametrize( "number, feature, expected_is_supported", [ (15, 16, False), (16, 2, False), (31, 64, False), (70, 4, True), (9, 8, True), ...
expected_is_supported
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/integration/deconz_test.py
test_callback
assert_*
variable
41
from typing import Dict, Optional import pytest from appdaemon.plugins.hass.hassapi import Hass from cx_core.controller import Controller from cx_core.integration.deconz import DeCONZIntegration from pytest_mock.plugin import MockerFixture from tests.test_utils import wrap_execution @pytest.mark.parametrize( "da...
expected)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/integration/deconz_test.py
test_listen_changes
assert_*
string_literal
39
from typing import Dict, Optional import pytest from appdaemon.plugins.hass.hassapi import Hass from cx_core.controller import Controller from cx_core.integration.deconz import DeCONZIntegration from pytest_mock.plugin import MockerFixture from tests.test_utils import wrap_execution @pytest.mark.parametrize( "li...
"deconz_event")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/integration/integration_test.py
test_get_integrations
assert
collection
8
from cx_core import integration as integration_module from cx_core.controller import Controller def test_get_integrations(fake_controller: Controller): integrations = integration_module.get_integrations(fake_controller, {}) inteagration_names = {i.name for i in integrations} assert inteagration_names ==
{ "z2m", "zha", "deconz", "state", "mqtt", "lutron_caseta", }
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/integration/lutron_test.py
test_callback
assert_*
variable
47
from typing import Dict import pytest from appdaemon.plugins.hass.hassapi import Hass from cx_core.controller import Controller from cx_core.integration.lutron_caseta import LutronIntegration from pytest_mock.plugin import MockerFixture @pytest.mark.parametrize( "data, expected", [ ( { ...
expected)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/integration/lutron_test.py
test_listen_changes
assert_*
string_literal
21
from typing import Dict import pytest from appdaemon.plugins.hass.hassapi import Hass from cx_core.controller import Controller from cx_core.integration.lutron_caseta import LutronIntegration from pytest_mock.plugin import MockerFixture @pytest.mark.asyncio async def test_listen_changes( fake_controller: Controll...
"lutron_caseta_button_event")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/integration/mqtt_test.py
test_callback
assert_*
variable
35
from typing import Dict import pytest from appdaemon.plugins.mqtt.mqttapi import Mqtt from cx_core.controller import Controller from cx_core.integration.mqtt import MQTTIntegration from pytest_mock.plugin import MockerFixture @pytest.mark.parametrize( "data, expected", [ ( {"payload": "cli...
expected)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/integration/mqtt_test.py
test_listen_changes
assert_*
complex_expr
21
from typing import Dict import pytest from appdaemon.plugins.mqtt.mqttapi import Mqtt from cx_core.controller import Controller from cx_core.integration.mqtt import MQTTIntegration from pytest_mock.plugin import MockerFixture @pytest.mark.asyncio async def test_listen_changes( fake_controller: Controller, moc...
mqtt_integration.event_callback)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/integration/state_test.py
test_callback
assert_*
string_literal
21
from typing import Optional import pytest from appdaemon.plugins.hass.hassapi import Hass from cx_core.controller import Controller from cx_core.integration.state import StateIntegration from pytest_mock.plugin import MockerFixture @pytest.mark.asyncio async def test_callback( fake_controller: Controller, moc...
"new_state")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/integration/state_test.py
test_listen_changes
assert_*
variable
24
from typing import Optional import pytest from appdaemon.plugins.hass.hassapi import Hass from cx_core.controller import Controller from cx_core.integration.state import StateIntegration from pytest_mock.plugin import MockerFixture @pytest.mark.parametrize("attribute", ["sensor", "entity_id", None]) @pytest.mark.asyn...
controller_id)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/integration/z2m_test.py
test_listen_changes
assert_*
string_literal
49
import json from typing import Any, Dict, Optional import pytest from appdaemon.plugins.hass.hassapi import Hass from appdaemon.plugins.mqtt.mqttapi import Mqtt from cx_core.controller import Controller from cx_core.integration.z2m import Z2MIntegration from pytest_mock import MockerFixture from tests.test_utils impo...
"controller_id")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/integration/z2m_test.py
test_event_callback
assert_*
variable
58
import json from typing import Any, Dict, Optional import pytest from appdaemon.plugins.hass.hassapi import Hass from appdaemon.plugins.mqtt.mqttapi import Mqtt from cx_core.controller import Controller from cx_core.integration.z2m import Z2MIntegration from pytest_mock import MockerFixture from tests.test_utils impo...
expected_called_with)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/integration/z2m_test.py
test_listen_changes
assert_*
complex_expr
55
import json from typing import Any, Dict, Optional import pytest from appdaemon.plugins.hass.hassapi import Hass from appdaemon.plugins.mqtt.mqttapi import Mqtt from cx_core.controller import Controller from cx_core.integration.z2m import Z2MIntegration from pytest_mock import MockerFixture from tests.test_utils impo...
z2m_integration.event_callback)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/integration/zha_test.py
test_listen_changes
assert_*
string_literal
21
from typing import Dict, Optional import pytest from appdaemon.plugins.hass.hassapi import Hass from cx_core.controller import Controller from cx_core.integration.zha import ZHAIntegration from pytest_mock.plugin import MockerFixture @pytest.mark.asyncio async def test_listen_changes( fake_controller: Controller,...
"zha_event")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/integration/zha_test.py
test_callback
assert_*
variable
55
from typing import Dict, Optional import pytest from appdaemon.plugins.hass.hassapi import Hass from cx_core.controller import Controller from cx_core.integration.zha import ZHAIntegration from pytest_mock.plugin import MockerFixture @pytest.mark.parametrize( "command, args, expected_called_with", [ (...
expected_called_with)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/release_hold_controller_test.py
test_init
assert
numeric_literal
24
import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import ReleaseHoldController from cx_core.controller import Controller from pytest_mock import MockerFixture from tests.test_utils import fake_fn def sut_before_init(mocker: MockerFixture) -> FakeReleaseHoldController: controller = FakeRelease...
500
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/release_hold_controller_test.py
test_before_action
assert
variable
45
import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import ReleaseHoldController from cx_core.controller import Controller from pytest_mock import MockerFixture from tests.test_utils import fake_fn def sut_before_init(mocker: MockerFixture) -> FakeReleaseHoldController: controller = FakeRelease...
continue_call
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/stepper/bounce_stepper_test.py
test_bounce_stepper
assert
variable
34
import pytest from cx_core.stepper import MinMax, Stepper from cx_core.stepper.bounce_stepper import BounceStepper from typing_extensions import Literal @pytest.mark.parametrize( "min_max, value, steps, direction, expected_value, expected_direction", [ (MinMax(0, 10), 5, 10, Stepper.DOWN, 4, Stepper.DO...
expected_value
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/stepper/bounce_stepper_test.py
test_bounce_stepper
assert
variable
35
import pytest from cx_core.stepper import MinMax, Stepper from cx_core.stepper.bounce_stepper import BounceStepper from typing_extensions import Literal @pytest.mark.parametrize( "min_max, value, steps, direction, expected_value, expected_direction", [ (MinMax(0, 10), 5, 10, Stepper.DOWN, 4, Stepper.DO...
expected_direction
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/stepper/index_loop_stepper_test.py
test_index_loop_stepper
assert
variable
27
import pytest from cx_core.stepper import Stepper from cx_core.stepper.index_loop_stepper import IndexLoopStepper from typing_extensions import Literal @pytest.mark.parametrize( "size, value, direction, expected_value", [ (10, 5, Stepper.DOWN, 4), (10, 5, Stepper.UP, 6), (10, 1, Stepper...
expected_value
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/stepper/loop_stepper_test.py
test_loop_stepper
assert
variable
35
import pytest from cx_core.stepper import MinMax, Stepper from cx_core.stepper.loop_stepper import LoopStepper from typing_extensions import Literal @pytest.mark.parametrize( "min_max, value, steps, direction, expected_value", [ (MinMax(0, 10), 5, 10, Stepper.DOWN, 4), (MinMax(0, 10), 5, 10, St...
expected_value
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/stepper/stepper_test.py
test_sign
assert
variable
18
import pytest from cx_const import Number from cx_core.stepper import MinMax, Stepper, StepperOutput @pytest.mark.parametrize( "direction_input, expected_sign", [ (Stepper.UP, 1), (Stepper.DOWN, -1), (Stepper.UP, 1), (Stepper.DOWN, -1), ], ) def test_sign(direction_input: st...
expected_sign
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/stepper/stepper_test.py
test_get_direction
assert
variable
25
import pytest from cx_const import Number from cx_core.stepper import MinMax, Stepper, StepperOutput @pytest.mark.parametrize( "direction_input, previous_direction, expected_direction", [ (Stepper.UP, Stepper.UP, Stepper.UP), (Stepper.DOWN, Stepper.DOWN, Stepper.DOWN), (Stepper.UP, Step...
expected_direction
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/stepper/stop_stepper_test.py
test_stop_stepper_step
assert
variable
34
import pytest from cx_core.stepper import MinMax, Stepper from cx_core.stepper.stop_stepper import StopStepper from typing_extensions import Literal @pytest.mark.parametrize( "min_max, value, steps, direction, expected_value, expected_exceeded", [ (MinMax(0, 10), 5, 10, Stepper.DOWN, 4, False), ...
expected_value
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/stepper/stop_stepper_test.py
test_stop_stepper_step
assert
variable
35
import pytest from cx_core.stepper import MinMax, Stepper from cx_core.stepper.stop_stepper import StopStepper from typing_extensions import Literal @pytest.mark.parametrize( "min_max, value, steps, direction, expected_value, expected_exceeded", [ (MinMax(0, 10), 5, 10, Stepper.DOWN, 4, False), ...
expected_exceeded
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/stepper/stop_stepper_test.py
test_stop_stepper_get_direction
assert
variable
120
import pytest from cx_core.stepper import MinMax, Stepper from cx_core.stepper.stop_stepper import StopStepper from typing_extensions import Literal @pytest.mark.parametrize( "min_max, value, direction, previous_direction, expected_direction, expected_new_previous_direction", [ (MinMax(0, 10), 10, Step...
expected_direction
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/stepper/stop_stepper_test.py
test_stop_stepper_get_direction
assert
variable
121
import pytest from cx_core.stepper import MinMax, Stepper from cx_core.stepper.stop_stepper import StopStepper from typing_extensions import Literal @pytest.mark.parametrize( "min_max, value, direction, previous_direction, expected_direction, expected_new_previous_direction", [ (MinMax(0, 10), 10, Step...
expected_new_previous_direction
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/cover_controller_test.py
test_open
assert
numeric_literal
67
from typing import Any, Dict import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import CoverController from cx_core.controller import Controller from cx_core.feature_support.cover import CoverSupport from cx_core.type_controller import TypeController from pytest_mock.plugin import MockerFixture fr...
0
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/cover_controller_test.py
test_init
assert
variable
56
from typing import Any, Dict import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import CoverController from cx_core.controller import Controller from cx_core.feature_support.cover import CoverSupport from cx_core.type_controller import TypeController from pytest_mock.plugin import MockerFixture fr...
open_position
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/cover_controller_test.py
test_init
assert
variable
57
from typing import Any, Dict import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import CoverController from cx_core.controller import Controller from cx_core.feature_support.cover import CoverSupport from cx_core.type_controller import TypeController from pytest_mock.plugin import MockerFixture fr...
close_position
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/cover_controller_test.py
test_open
assert_*
variable
63
from typing import Any, Dict import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import CoverController from cx_core.controller import Controller from cx_core.feature_support.cover import CoverSupport from cx_core.type_controller import TypeController from pytest_mock.plugin import MockerFixture fr...
expected_service)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/cover_controller_test.py
test_stop
assert_*
string_literal
36
from typing import Any, Dict import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import CoverController from cx_core.controller import Controller from cx_core.feature_support.cover import CoverSupport from cx_core.type_controller import TypeController from pytest_mock.plugin import MockerFixture fr...
"cover/stop_cover")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/light_controller_test.py
test_hold_loop
assert_*
string_literal
52
from typing import Any, Dict, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import LightController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.light import LightSupport from cx_core.stepper import MinMax, Stepper from cx_core.stepper...
"hold")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/light_controller_test.py
test_hold
assert_*
variable
94
from typing import Any, Dict, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import LightController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.light import LightSupport from cx_core.stepper import MinMax, Stepper from cx_core.stepper...
stepper)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/light_controller_test.py
test_change_light_state
assert
variable
97
from typing import Any, Dict, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import LightController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.light import LightSupport from cx_core.stepper import MinMax, Stepper from cx_core.stepper...
stop_expected
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/light_controller_test.py
test_init
assert
variable
76
from typing import Any, Dict, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import LightController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.light import LightSupport from cx_core.stepper import MinMax, Stepper from cx_core.stepper...
expected_name
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/light_controller_test.py
test_click
assert
variable
72
from typing import Any, Dict, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import LightController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.light import LightSupport from cx_core.stepper import MinMax, Stepper from cx_core.stepper...
expected_calls
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/light_controller_test.py
test_is_color_supported
assert
variable
51
from typing import Any, Dict, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import LightController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.light import LightSupport from cx_core.stepper import MinMax, Stepper from cx_core.stepper...
expected_output
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/light_controller_test.py
test_call_light_service
assert_*
string_literal
68
from typing import Any, Dict, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import LightController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.light import LightSupport from cx_core.stepper import MinMax, Stepper from cx_core.stepper...
"test_service")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/light_controller_test.py
test_toggle
assert_*
string_literal
41
from typing import Any, Dict, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import LightController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.light import LightSupport from cx_core.stepper import MinMax, Stepper from cx_core.stepper...
"light/toggle")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/light_controller_test.py
test_on
assert_*
string_literal
44
from typing import Any, Dict, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import LightController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.light import LightSupport from cx_core.stepper import MinMax, Stepper from cx_core.stepper...
"light/turn_on")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/light_controller_test.py
test_off
assert_*
string_literal
41
from typing import Any, Dict, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import LightController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.light import LightSupport from cx_core.stepper import MinMax, Stepper from cx_core.stepper...
"light/turn_off")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/light_controller_test.py
test_get_attribute
assert
variable
82
from typing import Any, Dict, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import LightController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.light import LightSupport from cx_core.stepper import MinMax, Stepper from cx_core.stepper...
expected_attribute
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/light_controller_test.py
test_init
assert
variable
77
from typing import Any, Dict, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import LightController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.light import LightSupport from cx_core.stepper import MinMax, Stepper from cx_core.stepper...
expected_color_mode
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/light_controller_test.py
test_get_value_attribute
assert
func_call
69
from typing import Any, Dict, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import LightController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.light import LightSupport from cx_core.stepper import MinMax, Stepper from cx_core.stepper...
float(expected_output)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/light_controller_test.py
test_change_light_state
assert
variable
98
from typing import Any, Dict, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import LightController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.light import LightSupport from cx_core.stepper import MinMax, Stepper from cx_core.stepper...
expected_value_attribute
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/light_controller_test.py
test_check_remove_transition
assert
variable
72
from typing import Any, Dict, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import LightController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.light import LightSupport from cx_core.stepper import MinMax, Stepper from cx_core.stepper...
expected_remove_transition_check
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/media_player_controller_test.py
test_hold
assert_*
variable
34
from typing import List import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import MediaPlayerController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.media_player import MediaPlayerSupport from cx_core.stepper import Stepper from pytest_mock.plugin im...
direction)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/media_player_controller_test.py
test_change_source_list
assert
variable
64
from typing import List import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import MediaPlayerController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.media_player import MediaPlayerSupport from cx_core.stepper import Stepper from pytest_mock.plugin im...
expected_calls
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/media_player_controller_test.py
test_tts
assert_*
string_literal
39
from typing import List import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import MediaPlayerController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.media_player import MediaPlayerSupport from cx_core.stepper import Stepper from pytest_mock.plugin im...
"tts.fake_service")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/media_player_controller_test.py
test_play
assert_*
string_literal
31
from typing import List import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import MediaPlayerController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.media_player import MediaPlayerSupport from cx_core.stepper import Stepper from pytest_mock.plugin im...
"media_player/media_play")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/media_player_controller_test.py
test_volume_up
assert_*
string_literal
35
from typing import List import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import MediaPlayerController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.media_player import MediaPlayerSupport from cx_core.stepper import Stepper from pytest_mock.plugin im...
"media_player/volume_set")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/media_player_controller_test.py
test_pause
assert_*
string_literal
31
from typing import List import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import MediaPlayerController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.media_player import MediaPlayerSupport from cx_core.stepper import Stepper from pytest_mock.plugin im...
"media_player/media_pause")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/media_player_controller_test.py
test_volume_mute
assert_*
string_literal
31
from typing import List import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import MediaPlayerController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.media_player import MediaPlayerSupport from cx_core.stepper import Stepper from pytest_mock.plugin im...
"media_player/volume_mute")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/media_player_controller_test.py
test_change_source_list
assert_*
string_literal
66
from typing import List import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import MediaPlayerController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.media_player import MediaPlayerSupport from cx_core.stepper import Stepper from pytest_mock.plugin im...
"media_player/select_source")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/media_player_controller_test.py
test_play_pause
assert_*
string_literal
31
from typing import List import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import MediaPlayerController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.media_player import MediaPlayerSupport from cx_core.stepper import Stepper from pytest_mock.plugin im...
"media_player/media_play_pause")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/media_player_controller_test.py
test_next_track
assert_*
string_literal
31
from typing import List import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import MediaPlayerController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.media_player import MediaPlayerSupport from cx_core.stepper import Stepper from pytest_mock.plugin im...
"media_player/media_next_track")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/media_player_controller_test.py
test_previous_track
assert_*
string_literal
31
from typing import List import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import MediaPlayerController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.media_player import MediaPlayerSupport from cx_core.stepper import Stepper from pytest_mock.plugin im...
"media_player/media_previous_track")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/media_player_controller_test.py
test_hold_loop
assert_*
string_literal
58
from typing import List import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import MediaPlayerController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.media_player import MediaPlayerSupport from cx_core.stepper import Stepper from pytest_mock.plugin im...
f"media_player/volume_{direction_input}")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/switch_controller_test.py
test_toggle
assert_*
string_literal
21
import pytest from cx_core import SwitchController from cx_core.type_controller import Entity from pytest_mock.plugin import MockerFixture from tests.test_utils import fake_fn ENTITY_NAME = "switch.test" async def sut(mocker: MockerFixture): c = SwitchController() # type: ignore mocker.patch.object(c, "get_...
"homeassistant/toggle")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/switch_controller_test.py
test_turn_on
assert_*
string_literal
21
import pytest from cx_core import SwitchController from cx_core.type_controller import Entity from pytest_mock.plugin import MockerFixture from tests.test_utils import fake_fn ENTITY_NAME = "switch.test" async def sut(mocker: MockerFixture): c = SwitchController() # type: ignore mocker.patch.object(c, "get_...
"homeassistant/turn_on")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type/switch_controller_test.py
test_turn_off
assert_*
string_literal
21
import pytest from cx_core import SwitchController from cx_core.type_controller import Entity from pytest_mock.plugin import MockerFixture from tests.test_utils import fake_fn ENTITY_NAME = "switch.test" async def sut(mocker: MockerFixture): c = SwitchController() # type: ignore mocker.patch.object(c, "get_...
"homeassistant/turn_off")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type_controller_test.py
test_init
assert
variable
47
from typing import Any, Dict, List, Optional, Type, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core.controller import Controller from cx_core.type_controller import Entity, TypeController from pytest_mock.plugin import MockerFixture from tests.test_utils import fake_fn, wrap_execution EN...
ENTITY_NAME
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type_controller_test.py
test_get_entity_state
assert_*
variable
62
from typing import Any, Dict, List, Optional, Type, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core.controller import Controller from cx_core.type_controller import Entity, TypeController from pytest_mock.plugin import MockerFixture from tests.test_utils import fake_fn, wrap_execution EN...
entity_input)
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type_controller_test.py
test_get_entity_state
assert_*
string_literal
68
from typing import Any, Dict, List, Optional, Type, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core.controller import Controller from cx_core.type_controller import Entity, TypeController from pytest_mock.plugin import MockerFixture from tests.test_utils import fake_fn, wrap_execution EN...
"entity.test")
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_core/type_controller_test.py
test_init
assert
func_call
49
from typing import Any, Dict, List, Optional, Type, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core.controller import Controller from cx_core.type_controller import Entity, TypeController from pytest_mock.plugin import MockerFixture from tests.test_utils import fake_fn, wrap_execution EN...
args[ENTITY_ARG].get( "attr_test", DEFAULT_ATTR_TEST )
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_devices/aqara_test.py
test_zha_action_MFKZQ01LMLightController
assert
variable
26
import pytest from cx_core.integration import EventData from cx_devices.aqara import ( MFKZQ01LMLightController, WXKG01LMLightController, WXKG11LMRemoteLightController, WXKG11LMSensorSwitchLightController, ) @pytest.mark.parametrize( "data, expected_action", [ ({"command": "shake"}, "sh...
expected_action
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_devices/aurora_test.py
test_zha_action_WXKG01LMLightController
assert
variable
20
import pytest from cx_core.integration import EventData from cx_devices.aurora import AUA1ZBR2GWLightController @pytest.mark.parametrize( "data, expected_action", [ ({"command": "on"}, "1_toggle"), ({"command": "on", "endpoint_id": 2}, "2_toggle"), ({"command": "off"}, "1_toggle"), ...
expected_action
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_devices/devices_test.py
test_devices
assert
none_literal
47
from typing import Callable, KeysView, List, Optional, Type import cx_devices as devices_module import pytest from cx_const import ActionEvent, DefaultActionsMapping from cx_core import Controller, ReleaseHoldController from tests.test_utils import get_classes, get_controller def check_mapping( mapping: Optional...
None
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_devices/legrand_test.py
test_get_zha_action_LegrandWallController
assert
variable
21
import pytest from cx_core.integration import EventData from cx_devices.legrand import get_zha_action_LegrandWallController @pytest.mark.parametrize( "data, expected_action", [ ({"endpoint_id": 1, "command": "off", "args": []}, "1_off"), ({"endpoint_id": 1, "command": "on", "args": []}, "1_on")...
expected_action
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_devices/muller_licht_test.py
test_zha_action_MLI404002
assert
variable
46
import pytest from cx_core.integration import EventData from cx_devices.muller_licht import MLI404002LightController @pytest.mark.parametrize( "data, expected_action", [ ( {"command": "on", "args": []}, "on", ), ( {"command": "off", "args": []}, ...
expected_action
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_devices/phillips_test.py
test_zha_action_HueDimmerController
assert
variable
17
import pytest from cx_core.integration import EventData from cx_devices.phillips import HueDimmerController @pytest.mark.parametrize( "data, expected_action", [ ({"command": "on_long_release"}, "on_long_release"), ({"command": "down_press"}, "down_press"), ({"command": "off_hold"}, "off...
expected_action
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xaviml/controllerx
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
train
train
tests/unit_tests/cx_devices/rgb_genie_test.py
test_zha_action_MFKZQ01LMLightController
assert
variable
22
import pytest from cx_core.integration import EventData from cx_devices.rgb_genie import ZB5122LightController @pytest.mark.parametrize( "data, expected_action", [ ({"command": "on"}, "on"), ({"command": "off"}, "off"), ({"command": "stop"}, "stop"), ({"command": "move_to_color"...
expected_action
3f13f042b6a877af6fad950fc6a4001461fc86cf
73
v2_extractor_at_anchor
xflr6/graphviz
acf79bca4518781cad02c102e89ec4e9ce757088
240
train
train
docs/conftest.py
pytest_addoption
assert
func_call
15
import pytest SKIP_EXE = '--skip-exe' def pytest_addoption(parser): # pragma: no cover try: parser.addoption(SKIP_EXE, action='store_true', help='Skip tests with pytest.mark.exe.' ' Xfail tests with pytest.mark.exe(xfail=True).' ...
str(e)
acf79bca4518781cad02c102e89ec4e9ce757088
240
v2_extractor_at_anchor
xflr6/graphviz
acf79bca4518781cad02c102e89ec4e9ce757088
240
train
train
graphviz/conftest.py
pytest_addoption
assert
func_call
15
import pytest SKIP_EXE = '--skip-exe' def pytest_addoption(parser): # pragma: no cover try: parser.addoption(SKIP_EXE, action='store_true', help='Skip tests with pytest.mark.exe.' ' Xfail tests with pytest.mark.exe(xfail=True).' ...
str(e)
acf79bca4518781cad02c102e89ec4e9ce757088
240
v2_extractor_at_anchor
xflr6/graphviz
acf79bca4518781cad02c102e89ec4e9ce757088
240
train
train
tests/backend/test_execute.py
test_run_check_oserror
pytest.raises
variable
17
import errno import io import subprocess import pytest import graphviz from graphviz.backend import execute import _common def empty_path(monkeypatch): monkeypatch.setenv('PATH', '') def test_run_check_oserror(): with pytest.raises(
OSError)
acf79bca4518781cad02c102e89ec4e9ce757088
240
v2_extractor_at_anchor
xflr6/graphviz
acf79bca4518781cad02c102e89ec4e9ce757088
240
train
train
tests/backend/test_execute.py
test_run_check_input_lines_mocked
assert
variable
39
import errno import io import subprocess import pytest import graphviz from graphviz.backend import execute import _common def empty_path(monkeypatch): monkeypatch.setenv('PATH', '') def test_run_check_input_lines_mocked(mocker, sentinel, mock_popen, line=b'sp\xc3\xa4m'): ...
mock_out
acf79bca4518781cad02c102e89ec4e9ce757088
240
v2_extractor_at_anchor
xflr6/graphviz
acf79bca4518781cad02c102e89ec4e9ce757088
240
train
train
tests/backend/test_execute.py
test_run_check_input_lines_mocked
assert
variable
40
import errno import io import subprocess import pytest import graphviz from graphviz.backend import execute import _common def empty_path(monkeypatch): monkeypatch.setenv('PATH', '') def test_run_check_input_lines_mocked(mocker, sentinel, mock_popen, line=b'sp\xc3\xa4m'): ...
mock_err
acf79bca4518781cad02c102e89ec4e9ce757088
240
v2_extractor_at_anchor
xflr6/graphviz
acf79bca4518781cad02c102e89ec4e9ce757088
240
train
train
tests/backend/test_execute.py
test_run_check_input_lines_mocked
assert
complex_expr
37
import errno import io import subprocess import pytest import graphviz from graphviz.backend import execute import _common def empty_path(monkeypatch): monkeypatch.setenv('PATH', '') def test_run_check_input_lines_mocked(mocker, sentinel, mock_popen, line=b'sp\xc3\xa4m'): ...
proc.args
acf79bca4518781cad02c102e89ec4e9ce757088
240
v2_extractor_at_anchor
xflr6/graphviz
acf79bca4518781cad02c102e89ec4e9ce757088
240
train
train
tests/backend/test_execute.py
test_run_check_input_lines_mocked
assert
complex_expr
38
import errno import io import subprocess import pytest import graphviz from graphviz.backend import execute import _common def empty_path(monkeypatch): monkeypatch.setenv('PATH', '') def test_run_check_input_lines_mocked(mocker, sentinel, mock_popen, line=b'sp\xc3\xa4m'): ...
proc.returncode
acf79bca4518781cad02c102e89ec4e9ce757088
240
v2_extractor_at_anchor
xflr6/graphviz
acf79bca4518781cad02c102e89ec4e9ce757088
240
train
train
tests/backend/test_execute.py
test_run_check_input_lines_mocked
assert_*
complex_expr
49
import errno import io import subprocess import pytest import graphviz from graphviz.backend import execute import _common def empty_path(monkeypatch): monkeypatch.setenv('PATH', '') def test_run_check_input_lines_mocked(mocker, sentinel, mock_popen, line=b'sp\xc3\xa4m'): ...
sentinel.encoding)
acf79bca4518781cad02c102e89ec4e9ce757088
240
v2_extractor_at_anchor
xflr6/graphviz
acf79bca4518781cad02c102e89ec4e9ce757088
240
train
train
tests/backend/test_execute.py
test_run_check_oserror
assert
collection
20
import errno import io import subprocess import pytest import graphviz from graphviz.backend import execute import _common def empty_path(monkeypatch): monkeypatch.setenv('PATH', '') def test_run_check_oserror(): with pytest.raises(OSError) as e: execute.run_check(_common.INVALID_CMD) assert ...
(errno.EACCES, errno.EINVAL)
acf79bca4518781cad02c102e89ec4e9ce757088
240
v2_extractor_at_anchor
xflr6/graphviz
acf79bca4518781cad02c102e89ec4e9ce757088
240
train
train
tests/backend/test_execute.py
test_run_check_called_process_error_mocked
assert
collection
27
import errno import io import subprocess import pytest import graphviz from graphviz.backend import execute import _common def empty_path(monkeypatch): monkeypatch.setenv('PATH', '') def test_run_check_called_process_error_mocked(capsys, mock_run, quiet, stdout='I...
('', '' if quiet else stderr)
acf79bca4518781cad02c102e89ec4e9ce757088
240
v2_extractor_at_anchor