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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_common_utils.py | test_merge_dicts | assert | variable | 9 | import pytest
from pyprland.common import merge, apply_filter, is_rotated
def test_merge_dicts():
d1 = {"a": 1, "b": {"x": 10}}
d2 = {"b": {"y": 20}, "c": 3}
expected = {"a": 1, "b": {"x": 10, "y": 20}, "c": 3}
assert merge(d1, d2) == | expected | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_common_utils.py | test_apply_filter_substitute | assert | string_literal | 6 | import pytest
from pyprland.common import merge, apply_filter, is_rotated
def test_apply_filter_substitute():
assert apply_filter("hello world", "s/world/there/") == | "hello there" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_common_utils.py | test_apply_filter_substitute_global | assert | string_literal | 6 | import pytest
from pyprland.common import merge, apply_filter, is_rotated
def test_apply_filter_substitute_global():
assert apply_filter("foo bar foo", "s/foo/baz/g") == | "baz bar baz" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_common_utils.py | test_apply_filter_substitute_global | assert | string_literal | 7 | import pytest
from pyprland.common import merge, apply_filter, is_rotated
def test_apply_filter_substitute_global():
assert apply_filter("foo bar foo", "s/foo/baz/g") == "baz bar baz"
assert apply_filter("foo bar foo", "s/foo/baz/") == | "baz bar foo" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_config.py | test_config_access | assert | numeric_literal | 8 | import pytest
from unittest.mock import Mock
from pyprland.common import Configuration
def test_config_access():
conf = Configuration({"a": 1, "b": "test"})
assert conf["a"] == | 1 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_config.py | test_config_access | assert | numeric_literal | 10 | import pytest
from unittest.mock import Mock
from pyprland.common import Configuration
def test_config_access():
conf = Configuration({"a": 1, "b": "test"})
assert conf["a"] == 1
assert conf.get("b") == "test"
assert conf.get("c", 3) == | 3 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_config.py | test_get_int | assert | numeric_literal | 9 | import pytest
from unittest.mock import Mock
from pyprland.common import Configuration
def test_get_int():
conf = Configuration({"a": 1, "b": "2", "c": "invalid"})
assert conf.get_int("a") == 1
assert conf.get_int("b") == | 2 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_config.py | test_get_int | assert | numeric_literal | 11 | import pytest
from unittest.mock import Mock
from pyprland.common import Configuration
def test_get_int():
conf = Configuration({"a": 1, "b": "2", "c": "invalid"})
assert conf.get_int("a") == 1
assert conf.get_int("b") == 2
assert conf.get_int("c", default=10) == 10
assert conf.get_int("missing", ... | 5 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_config.py | test_get_int | assert | numeric_literal | 10 | import pytest
from unittest.mock import Mock
from pyprland.common import Configuration
def test_get_int():
conf = Configuration({"a": 1, "b": "2", "c": "invalid"})
assert conf.get_int("a") == 1
assert conf.get_int("b") == 2
assert conf.get_int("c", default=10) == | 10 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_config.py | test_get_float | assert | numeric_literal | 8 | import pytest
from unittest.mock import Mock
from pyprland.common import Configuration
def test_get_float():
conf = Configuration({"a": 1.5, "b": "2.5", "c": "invalid"})
assert conf.get_float("a") == | 1.5 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_config.py | test_get_float | assert | numeric_literal | 9 | import pytest
from unittest.mock import Mock
from pyprland.common import Configuration
def test_get_float():
conf = Configuration({"a": 1.5, "b": "2.5", "c": "invalid"})
assert conf.get_float("a") == 1.5
assert conf.get_float("b") == | 2.5 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_config.py | test_get_float | assert | numeric_literal | 11 | import pytest
from unittest.mock import Mock
from pyprland.common import Configuration
def test_get_float():
conf = Configuration({"a": 1.5, "b": "2.5", "c": "invalid"})
assert conf.get_float("a") == 1.5
assert conf.get_float("b") == 2.5
assert conf.get_float("c", default=10.0) == 10.0
assert conf... | 5.5 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_config.py | test_get_bool | assert | bool_literal | 23 | import pytest
from unittest.mock import Mock
from pyprland.common import Configuration
def test_get_bool():
conf = Configuration(
{
"t1": True,
"t2": "true",
"t3": "yes",
"t4": "on",
"t5": "1",
"f1": False,
"f2": "false",
... | True | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_config.py | test_get_float | assert | numeric_literal | 10 | import pytest
from unittest.mock import Mock
from pyprland.common import Configuration
def test_get_float():
conf = Configuration({"a": 1.5, "b": "2.5", "c": "invalid"})
assert conf.get_float("a") == 1.5
assert conf.get_float("b") == 2.5
assert conf.get_float("c", default=10.0) == | 10.0 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_config.py | test_get_str | assert | string_literal | 9 | import pytest
from unittest.mock import Mock
from pyprland.common import Configuration
def test_get_str():
conf = Configuration({"a": "text", "b": 123})
assert conf.get_str("a") == "text"
assert conf.get_str("b") == | "123" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_config.py | test_config_access | assert | string_literal | 9 | import pytest
from unittest.mock import Mock
from pyprland.common import Configuration
def test_config_access():
conf = Configuration({"a": 1, "b": "test"})
assert conf["a"] == 1
assert conf.get("b") == | "test" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_config.py | test_get_str | assert | string_literal | 8 | import pytest
from unittest.mock import Mock
from pyprland.common import Configuration
def test_get_str():
conf = Configuration({"a": "text", "b": 123})
assert conf.get_str("a") == | "text" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_config.py | test_get_str | assert | string_literal | 10 | import pytest
from unittest.mock import Mock
from pyprland.common import Configuration
def test_get_str():
conf = Configuration({"a": "text", "b": 123})
assert conf.get_str("a") == "text"
assert conf.get_str("b") == "123"
assert conf.get_str("missing", "default") == | "default" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_external_plugins.py | test_ext_plugin | assert | numeric_literal | 25 | import sys
import pytest
import tomllib
from pytest_asyncio import fixture
from .conftest import mocks as tst
sys.path.append("sample_extension")
async def external_plugin_config(monkeypatch):
"""External config."""
config = """
[pyprland]
plugins = ["pypr_examples.focus_counter"]
"""
monkeypatch.setatt... | 0 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_interface.py | test_get_clients_filter | assert | numeric_literal | 57 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.interface import Plugin
from pyprland.common import Configuration
def plugin():
plugin = ConcretePlugin("test_plugin")
# Manually attach mocks for methods used in get_clients
plugin.hyprctl_json = AsyncMock()
plugin.st... | 3 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_interface.py | test_get_clients_filter | assert | numeric_literal | 63 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.interface import Plugin
from pyprland.common import Configuration
def plugin():
plugin = ConcretePlugin("test_plugin")
# Manually attach mocks for methods used in get_clients
plugin.hyprctl_json = AsyncMock()
plugin.st... | 4 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_interface.py | test_get_clients_filter | assert | numeric_literal | 68 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.interface import Plugin
from pyprland.common import Configuration
def plugin():
plugin = ConcretePlugin("test_plugin")
# Manually attach mocks for methods used in get_clients
plugin.hyprctl_json = AsyncMock()
plugin.st... | 1 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_interface.py | test_get_clients_filter | assert | numeric_literal | 74 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.interface import Plugin
from pyprland.common import Configuration
def plugin():
plugin = ConcretePlugin("test_plugin")
# Manually attach mocks for methods used in get_clients
plugin.hyprctl_json = AsyncMock()
plugin.st... | 2 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_interface.py | test_load_config | assert | numeric_literal | 29 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.interface import Plugin
from pyprland.common import Configuration
def plugin():
plugin = ConcretePlugin("test_plugin")
# Manually attach mocks for methods used in get_clients
plugin.hyprctl_json = AsyncMock()
plugin.st... | 123 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_interface.py | test_get_clients_filter | assert_* | string_literal | 73 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.interface import Plugin
from pyprland.common import Configuration
def plugin():
plugin = ConcretePlugin("test_plugin")
# Manually attach mocks for methods used in get_clients
plugin.hyprctl_json = AsyncMock()
plugin.st... | "1") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_interface.py | test_load_config | assert | string_literal | 28 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.interface import Plugin
from pyprland.common import Configuration
def plugin():
plugin = ConcretePlugin("test_plugin")
# Manually attach mocks for methods used in get_clients
plugin.hyprctl_json = AsyncMock()
plugin.st... | "value1" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_interface.py | test_plugin_init | assert | string_literal | 24 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.interface import Plugin
from pyprland.common import Configuration
def plugin():
plugin = ConcretePlugin("test_plugin")
# Manually attach mocks for methods used in get_clients
plugin.hyprctl_json = AsyncMock()
plugin.st... | "test_plugin" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_interface.py | test_load_config | assert | complex_expr | 30 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.interface import Plugin
from pyprland.common import Configuration
def plugin():
plugin = ConcretePlugin("test_plugin")
# Manually attach mocks for methods used in get_clients
plugin.hyprctl_json = AsyncMock()
plugin.st... | plugin.config | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_ipc.py | test_hyprland_backend_execute_success | assert | bool_literal | 30 | import asyncio
import json
import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland import ipc
from pyprland.models import PyprError
from pyprland.adapters.hyprland import HyprlandBackend
def mock_open_connection(mocker):
reader = AsyncMock()
# StreamWriter methods write and close are synch... | True | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_ipc.py | test_backend_get_client_props | assert | none_literal | 41 | import asyncio
import json
import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland import ipc
from pyprland.models import PyprError
from pyprland.adapters.hyprland import HyprlandBackend
def mock_open_connection(mocker):
reader = AsyncMock()
# StreamWriter methods write and close are synch... | None | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_ipc.py | test_hyprland_backend_execute_failure | assert | bool_literal | 30 | import asyncio
import json
import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland import ipc
from pyprland.models import PyprError
from pyprland.adapters.hyprland import HyprlandBackend
def mock_open_connection(mocker):
reader = AsyncMock()
# StreamWriter methods write and close are synch... | False | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_ipc.py | test_hyprctl_connection_context_manager | assert | variable | 26 | import asyncio
import json
import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland import ipc
from pyprland.models import PyprError
from pyprland.adapters.hyprland import HyprlandBackend
def mock_open_connection(mocker):
reader = AsyncMock()
# StreamWriter methods write and close are synch... | reader | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_ipc.py | test_hyprctl_connection_context_manager | assert | variable | 27 | import asyncio
import json
import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland import ipc
from pyprland.models import PyprError
from pyprland.adapters.hyprland import HyprlandBackend
def mock_open_connection(mocker):
reader = AsyncMock()
# StreamWriter methods write and close are synch... | writer | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_ipc.py | test_hyprland_backend_execute_batch | assert | variable | 34 | import asyncio
import json
import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland import ipc
from pyprland.models import PyprError
from pyprland.adapters.hyprland import HyprlandBackend
def mock_open_connection(mocker):
reader = AsyncMock()
# StreamWriter methods write and close are synch... | call_args | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_ipc.py | test_backend_get_client_props | assert | complex_expr | 33 | import asyncio
import json
import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland import ipc
from pyprland.models import PyprError
from pyprland.adapters.hyprland import HyprlandBackend
def mock_open_connection(mocker):
reader = AsyncMock()
# StreamWriter methods write and close are synch... | clients[0] | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_ipc.py | test_backend_get_client_props | assert | complex_expr | 37 | import asyncio
import json
import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland import ipc
from pyprland.models import PyprError
from pyprland.adapters.hyprland import HyprlandBackend
def mock_open_connection(mocker):
reader = AsyncMock()
# StreamWriter methods write and close are synch... | clients[1] | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_ipc.py | test_hyprctl_connection_error | pytest.raises | variable | 25 | import asyncio
import json
import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland import ipc
from pyprland.models import PyprError
from pyprland.adapters.hyprland import HyprlandBackend
def mock_open_connection(mocker):
reader = AsyncMock()
# StreamWriter methods write and close are synch... | PyprError) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_ipc.py | test_get_response | assert_* | string_literal | 29 | import asyncio
import json
import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland import ipc
from pyprland.models import PyprError
from pyprland.adapters.hyprland import HyprlandBackend
def mock_open_connection(mocker):
reader = AsyncMock()
# StreamWriter methods write and close are synch... | b"command") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_ipc.py | test_get_response | assert | collection | 28 | import asyncio
import json
import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland import ipc
from pyprland.models import PyprError
from pyprland.adapters.hyprland import HyprlandBackend
def mock_open_connection(mocker):
reader = AsyncMock()
# StreamWriter methods write and close are synch... | {"status": "ok"} | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_ipc.py | test_hyprland_backend_execute_success | assert_* | string_literal | 31 | import asyncio
import json
import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland import ipc
from pyprland.models import PyprError
from pyprland.adapters.hyprland import HyprlandBackend
def mock_open_connection(mocker):
reader = AsyncMock()
# StreamWriter methods write and close are synch... | b"/dispatch some_command") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_ipc.py | test_hyprctl_connection_error | assert_* | string_literal | 29 | import asyncio
import json
import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland import ipc
from pyprland.models import PyprError
from pyprland.adapters.hyprland import HyprlandBackend
def mock_open_connection(mocker):
reader = AsyncMock()
# StreamWriter methods write and close are synch... | "hyprctl socket not found! is it running ?") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_expose.py | test_exposed_clients_filtering | assert | numeric_literal | 31 | import pytest
from unittest.mock import Mock, AsyncMock
from pyprland.plugins.expose import Extension
from pyprland.models import ClientInfo
from pyprland.common import SharedState
def sample_clients():
return [
{"address": "0x1", "workspace": {"id": 1, "name": "1"}, "class": "App1"},
{"address": "... | 2 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_expose.py | test_exposed_clients_filtering | assert | numeric_literal | 37 | import pytest
from unittest.mock import Mock, AsyncMock
from pyprland.plugins.expose import Extension
from pyprland.models import ClientInfo
from pyprland.common import SharedState
def sample_clients():
return [
{"address": "0x1", "workspace": {"id": 1, "name": "1"}, "class": "App1"},
{"address": "... | 3 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_expose.py | test_run_expose_disable | assert | numeric_literal | 41 | import pytest
from unittest.mock import Mock, AsyncMock
from pyprland.plugins.expose import Extension
from pyprland.models import ClientInfo
from pyprland.common import SharedState
def sample_clients():
return [
{"address": "0x1", "workspace": {"id": 1, "name": "1"}, "class": "App1"},
{"address": "... | 4 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_expose.py | test_run_expose_empty_workspace | assert | numeric_literal | 40 | import pytest
from unittest.mock import Mock, AsyncMock
from pyprland.plugins.expose import Extension
from pyprland.models import ClientInfo
from pyprland.common import SharedState
def sample_clients():
return [
{"address": "0x1", "workspace": {"id": 1, "name": "1"}, "class": "App1"},
{"address": "... | 1 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_expose.py | test_run_expose_disable | assert | collection | 36 | import pytest
from unittest.mock import Mock, AsyncMock
from pyprland.plugins.expose import Extension
from pyprland.models import ClientInfo
from pyprland.common import SharedState
def sample_clients():
return [
{"address": "0x1", "workspace": {"id": 1, "name": "1"}, "class": "App1"},
{"address": "... | [] | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_expose.py | test_run_expose_enable | assert | variable | 44 | import pytest
from unittest.mock import Mock, AsyncMock
from pyprland.plugins.expose import Extension
from pyprland.models import ClientInfo
from pyprland.common import SharedState
def sample_clients():
return [
{"address": "0x1", "workspace": {"id": 1, "name": "1"}, "class": "App1"},
{"address": "... | calls | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_expose.py | test_run_expose_enable | assert | variable | 38 | import pytest
from unittest.mock import Mock, AsyncMock
from pyprland.plugins.expose import Extension
from pyprland.models import ClientInfo
from pyprland.common import SharedState
def sample_clients():
return [
{"address": "0x1", "workspace": {"id": 1, "name": "1"}, "class": "App1"},
{"address": "... | normal_clients | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_expose.py | test_run_expose_empty_workspace | assert | string_literal | 41 | import pytest
from unittest.mock import Mock, AsyncMock
from pyprland.plugins.expose import Extension
from pyprland.models import ClientInfo
from pyprland.common import SharedState
def sample_clients():
return [
{"address": "0x1", "workspace": {"id": 1, "name": "1"}, "class": "App1"},
{"address": "... | "togglespecialworkspace exposed" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_fetch_client_menu.py | test_run_fetch_client_menu | assert | string_literal | 44 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.fetch_client_menu import Extension
from pyprland.common import SharedState
def extension():
ext = Extension("fetch_client_menu")
ext.state = SharedState()
ext.state.active_workspace = "1"
ext.state.active_window = "0x1... | "3" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_fetch_client_menu.py | test_run_fetch_client_menu | assert | variable | 39 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.fetch_client_menu import Extension
from pyprland.common import SharedState
def extension():
ext = Extension("fetch_client_menu")
ext.state = SharedState()
ext.state.active_workspace = "1"
ext.state.active_window = "0x1... | options | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_fetch_client_menu.py | test_run_unfetch_client_unknown | assert_* | string_literal | 31 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.fetch_client_menu import Extension
from pyprland.common import SharedState
def extension():
ext = Extension("fetch_client_menu")
ext.state = SharedState()
ext.state.active_workspace = "1"
ext.state.active_window = "0x1... | "unknown window origin") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_fetch_client_menu.py | test_run_unfetch_client_success | assert_* | string_literal | 31 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.fetch_client_menu import Extension
from pyprland.common import SharedState
def extension():
ext = Extension("fetch_client_menu")
ext.state = SharedState()
ext.state.active_workspace = "1"
ext.state.active_window = "0x1... | "movetoworkspacesilent 2,address:0x123") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_fetch_client_menu.py | test_run_fetch_client_menu | assert_* | string_literal | 46 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.fetch_client_menu import Extension
from pyprland.common import SharedState
def extension():
ext = Extension("fetch_client_menu")
ext.state = SharedState()
ext.state.active_workspace = "1"
ext.state.active_window = "0x1... | f"movetoworkspace {extension.state.active_workspace},address:0xDEF") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_layout_center.py | test_calculate_geometry | assert | numeric_literal | 38 | import pytest
from unittest.mock import Mock, AsyncMock, call, MagicMock
from pyprland.plugins.layout_center import Extension
from pyprland.common import SharedState
def extension():
ext = Extension("layout_center")
ext.state = SharedState()
ext.state.active_workspace = "1"
ext.state.active_window = "0... | 60 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_layout_center.py | test_calculate_geometry | assert | numeric_literal | 39 | import pytest
from unittest.mock import Mock, AsyncMock, call, MagicMock
from pyprland.plugins.layout_center import Extension
from pyprland.common import SharedState
def extension():
ext = Extension("layout_center")
ext.state = SharedState()
ext.state.active_workspace = "1"
ext.state.active_window = "0... | 70 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_layout_center.py | test_calculate_geometry | assert | numeric_literal | 41 | import pytest
from unittest.mock import Mock, AsyncMock, call, MagicMock
from pyprland.plugins.layout_center import Extension
from pyprland.common import SharedState
def extension():
ext = Extension("layout_center")
ext.state = SharedState()
ext.state.active_workspace = "1"
ext.state.active_window = "0... | 980 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_layout_center.py | test_sanity_check_passes | assert | bool_literal | 29 | import pytest
from unittest.mock import Mock, AsyncMock, call, MagicMock
from pyprland.plugins.layout_center import Extension
from pyprland.common import SharedState
def extension():
ext = Extension("layout_center")
ext.state = SharedState()
ext.state.active_workspace = "1"
ext.state.active_window = "0... | True | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_layout_center.py | test_calculate_geometry | assert | numeric_literal | 40 | import pytest
from unittest.mock import Mock, AsyncMock, call, MagicMock
from pyprland.plugins.layout_center import Extension
from pyprland.common import SharedState
def extension():
ext = Extension("layout_center")
ext.state = SharedState()
ext.state.active_workspace = "1"
ext.state.active_window = "0... | 1820 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_layout_center.py | test_sanity_check_fails | assert | bool_literal | 30 | import pytest
from unittest.mock import Mock, AsyncMock, call, MagicMock
from pyprland.plugins.layout_center import Extension
from pyprland.common import SharedState
def extension():
ext = Extension("layout_center")
ext.state = SharedState()
ext.state.active_workspace = "1"
ext.state.active_window = "0... | False | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_layout_center.py | test_change_focus_next | assert | string_literal | 36 | import pytest
from unittest.mock import Mock, AsyncMock, call, MagicMock
from pyprland.plugins.layout_center import Extension
from pyprland.common import SharedState
def extension():
ext = Extension("layout_center")
ext.state = SharedState()
ext.state.active_workspace = "1"
ext.state.active_window = "0... | "0x2" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_layout_center.py | test_change_focus_prev_wrap | assert | string_literal | 36 | import pytest
from unittest.mock import Mock, AsyncMock, call, MagicMock
from pyprland.plugins.layout_center import Extension
from pyprland.common import SharedState
def extension():
ext = Extension("layout_center")
ext.state = SharedState()
ext.state.active_workspace = "1"
ext.state.active_window = "0... | "0x3" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_layout_center.py | test_change_focus_next | assert_* | string_literal | 37 | import pytest
from unittest.mock import Mock, AsyncMock, call, MagicMock
from pyprland.plugins.layout_center import Extension
from pyprland.common import SharedState
def extension():
ext = Extension("layout_center")
ext.state = SharedState()
ext.state.active_workspace = "1"
ext.state.active_window = "0... | "focuswindow address:0x2") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_layout_center.py | test_change_focus_prev_wrap | assert_* | string_literal | 37 | import pytest
from unittest.mock import Mock, AsyncMock, call, MagicMock
from pyprland.plugins.layout_center import Extension
from pyprland.common import SharedState
def extension():
ext = Extension("layout_center")
ext.state = SharedState()
ext.state.active_workspace = "1"
ext.state.active_window = "0... | "focuswindow address:0x3") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_lost_windows.py | test_run_attract_lost | assert | numeric_literal | 34 | import pytest
from unittest.mock import Mock, AsyncMock, MagicMock
from pyprland.plugins.lost_windows import Extension, contains
def extension():
ext = Extension("lost_windows")
ext.backend = AsyncMock()
ext.hyprctl = ext.backend.execute
ext.hyprctl_json = ext.backend.execute_json
ext.get_clients =... | 2 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_lost_windows.py | test_contains | assert | bool_literal | 18 | import pytest
from unittest.mock import Mock, AsyncMock, MagicMock
from pyprland.plugins.lost_windows import Extension, contains
def extension():
ext = Extension("lost_windows")
ext.backend = AsyncMock()
ext.hyprctl = ext.backend.execute
ext.hyprctl_json = ext.backend.execute_json
ext.get_clients =... | True | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_lost_windows.py | test_contains | assert | bool_literal | 23 | import pytest
from unittest.mock import Mock, AsyncMock, MagicMock
from pyprland.plugins.lost_windows import Extension, contains
def extension():
ext = Extension("lost_windows")
ext.backend = AsyncMock()
ext.hyprctl = ext.backend.execute
ext.hyprctl_json = ext.backend.execute_json
ext.get_clients =... | False | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_lost_windows.py | test_run_attract_lost | assert | complex_expr | 35 | import pytest
from unittest.mock import Mock, AsyncMock, MagicMock
from pyprland.plugins.lost_windows import Extension, contains
def extension():
ext = Extension("lost_windows")
ext.backend = AsyncMock()
ext.hyprctl = ext.backend.execute
ext.hyprctl_json = ext.backend.execute_json
ext.get_clients =... | calls[0] | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_lost_windows.py | test_run_attract_lost | assert | complex_expr | 36 | import pytest
from unittest.mock import Mock, AsyncMock, MagicMock
from pyprland.plugins.lost_windows import Extension, contains
def extension():
ext = Extension("lost_windows")
ext.backend = AsyncMock()
ext.hyprctl = ext.backend.execute
ext.hyprctl_json = ext.backend.execute_json
ext.get_clients =... | calls[1] | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_magnify.py | test_magnify | assert | variable | 23 | import pytest
from pytest_asyncio import fixture
from .conftest import mocks
from .testtools import wait_called
async def magnify_config(monkeypatch):
d = {"pyprland": {"plugins": ["magnify"]}, "magnify": {"factor": 2.0}}
monkeypatch.setattr("tomllib.load", lambda x: d)
yield
@pytest.mark.asyncio
async d... | cmd | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_menubar.py | test_get_best_monitor_hyprland | assert | string_literal | 42 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.menubar import get_pid_from_layers_hyprland, is_bar_in_layers_niri, is_bar_alive, Extension
def extension():
ext = Extension("menubar")
ext.backend = AsyncMock()
ext.hyprctl_json = ext.backend.execute_json
ext.notify_i... | "" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_menubar.py | test_get_pid_from_layers_hyprland | assert | numeric_literal | 19 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.menubar import get_pid_from_layers_hyprland, is_bar_in_layers_niri, is_bar_alive, Extension
def test_get_pid_from_layers_hyprland():
layers = {
"DP-1": {
"levels": {
"0": [
{... | 1234 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_menubar.py | test_is_bar_in_layers_niri | assert | bool_literal | 12 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.menubar import get_pid_from_layers_hyprland, is_bar_in_layers_niri, is_bar_alive, Extension
def test_is_bar_in_layers_niri():
# Bar exists
layers = [
{"namespace": "waybar", "output": "DP-1", "layer": "Top"},
{... | True | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_menubar.py | test_is_bar_alive_hyprland | assert | numeric_literal | 19 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.menubar import get_pid_from_layers_hyprland, is_bar_in_layers_niri, is_bar_alive, Extension
@pytest.mark.asyncio
async def test_is_bar_alive_hyprland():
backend = Mock()
backend.execute_json = AsyncMock()
# Case 1: Proces... | 5678 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_menubar.py | test_get_pid_from_layers_hyprland | assert | bool_literal | 30 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.menubar import get_pid_from_layers_hyprland, is_bar_in_layers_niri, is_bar_alive, Extension
def test_get_pid_from_layers_hyprland():
layers = {
"DP-1": {
"levels": {
"0": [
{... | False | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_menubar.py | test_get_best_monitor_hyprland | assert | string_literal | 37 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.menubar import get_pid_from_layers_hyprland, is_bar_in_layers_niri, is_bar_alive, Extension
def extension():
ext = Extension("menubar")
ext.backend = AsyncMock()
ext.hyprctl_json = ext.backend.execute_json
ext.notify_i... | "DP-1" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_menubar.py | test_is_bar_alive_hyprland | assert_* | string_literal | 20 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.menubar import get_pid_from_layers_hyprland, is_bar_in_layers_niri, is_bar_alive, Extension
@pytest.mark.asyncio
async def test_is_bar_alive_hyprland():
backend = Mock()
backend.execute_json = AsyncMock()
# Case 1: Proces... | "layers") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_menubar.py | test_is_bar_alive_niri | assert_* | string_literal | 21 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.menubar import get_pid_from_layers_hyprland, is_bar_in_layers_niri, is_bar_alive, Extension
@pytest.mark.asyncio
async def test_is_bar_alive_niri():
backend = Mock()
backend.execute_json = AsyncMock()
# Case 1: Process ex... | "Layers") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_menubar.py | test_get_best_monitor_hyprland | assert | string_literal | 28 | import pytest
from unittest.mock import Mock, AsyncMock, patch
from pyprland.plugins.menubar import get_pid_from_layers_hyprland, is_bar_in_layers_niri, is_bar_alive, Extension
def extension():
ext = Extension("menubar")
ext.backend = AsyncMock()
ext.hyprctl_json = ext.backend.execute_json
ext.notify_i... | "HDMI-A-1" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_monitor.py | test_nothing | assert | numeric_literal | 128 | import pytest
import tomllib
from pytest_asyncio import fixture
from .conftest import mocks as tst
from .testtools import wait_called
async def shapeL_config(monkeypatch):
"""L shape."""
config = """
[pyprland]
plugins = ["monitors"]
[monitors]
startup_relayout = false
new_monitor_delay = 0
[monitors.placem... | 1 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_monitor.py | assert_modes | assert | numeric_literal | 122 | import pytest
import tomllib
from pytest_asyncio import fixture
from .conftest import mocks as tst
from .testtools import wait_called
async def shapeL_config(monkeypatch):
"""L shape."""
config = """
[pyprland]
plugins = ["monitors"]
[monitors]
startup_relayout = false
new_monitor_delay = 0
[monitors.placem... | 0 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_monitor.py | test_nothing | assert | string_literal | 130 | import pytest
import tomllib
from pytest_asyncio import fixture
from .conftest import mocks as tst
from .testtools import wait_called
async def shapeL_config(monkeypatch):
"""L shape."""
config = """
[pyprland]
plugins = ["monitors"]
[monitors]
startup_relayout = false
new_monitor_delay = 0
[monitors.placem... | "notify" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_monitor.py | test_nothing | assert | complex_expr | 131 | import pytest
import tomllib
from pytest_asyncio import fixture
from .conftest import mocks as tst
from .testtools import wait_called
async def shapeL_config(monkeypatch):
"""L shape."""
config = """
[pyprland]
plugins = ["monitors"]
[monitors]
startup_relayout = false
new_monitor_delay = 0
[monitors.placem... | tst.hyprctl.call_args[0][0] | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_monitor.py | test_disables_monitor_list | assert_* | collection | 173 | import pytest
import tomllib
from pytest_asyncio import fixture
from .conftest import mocks as tst
from .testtools import wait_called
async def shapeL_config(monkeypatch):
"""L shape."""
config = """
[pyprland]
plugins = ["monitors"]
[monitors]
startup_relayout = false
new_monitor_delay = 0
[monitors.placem... | [ "monitor DP-1,3440x1440@59.999,0x0,1.0,transform,0", "monitor eDP-1,disable", "monitor HDMI-A-1,disable", ]) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_monitor.py | test_relayout | assert_* | collection | 129 | import pytest
import tomllib
from pytest_asyncio import fixture
from .conftest import mocks as tst
from .testtools import wait_called
async def shapeL_config(monkeypatch):
"""L shape."""
config = """
[pyprland]
plugins = ["monitors"]
[monitors]
startup_relayout = false
new_monitor_delay = 0
[monitors.placem... | [ "monitor HDMI-A-1,1920x1080@60.0,0x0,1.0,transform,0", "monitor DP-1,3440x1440@59.999,1920x0,1.0,transform,0", ]) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_monitor.py | test_events2 | assert_* | collection | 131 | import pytest
import tomllib
from pytest_asyncio import fixture
from .conftest import mocks as tst
from .testtools import wait_called
async def shapeL_config(monkeypatch):
"""L shape."""
config = """
[pyprland]
plugins = ["monitors"]
[monitors]
startup_relayout = false
new_monitor_delay = 0
[monitors.placem... | [ "monitor HDMI-A-1,1920x1080@60.0,3440x0,1.0,transform,0", "monitor DP-1,3440x1440@59.999,0x0,1.0,transform,0", ]) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_monitor.py | test_events3 | assert_* | collection | 131 | import pytest
import tomllib
from pytest_asyncio import fixture
from .conftest import mocks as tst
from .testtools import wait_called
async def shapeL_config(monkeypatch):
"""L shape."""
config = """
[pyprland]
plugins = ["monitors"]
[monitors]
startup_relayout = false
new_monitor_delay = 0
[monitors.placem... | [ "monitor HDMI-A-1,1920x1080@60.0,0x1440,1.0,transform,0", "monitor DP-1,3440x1440@59.999,0x0,1.0,transform,0", ]) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_monitor.py | test_events_d | assert_* | collection | 130 | import pytest
import tomllib
from pytest_asyncio import fixture
from .conftest import mocks as tst
from .testtools import wait_called
async def shapeL_config(monkeypatch):
"""L shape."""
config = """
[pyprland]
plugins = ["monitors"]
[monitors]
startup_relayout = false
new_monitor_delay = 0
[monitors.placem... | [ "monitor HDMI-A-1,1920x1080@60.0,0x180,1.0,transform,0", "monitor DP-1,3440x1440@59.999,1920x0,1.0,transform,0", ]) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_monitor.py | test_events4 | assert_* | collection | 131 | import pytest
import tomllib
from pytest_asyncio import fixture
from .conftest import mocks as tst
from .testtools import wait_called
async def shapeL_config(monkeypatch):
"""L shape."""
config = """
[pyprland]
plugins = ["monitors"]
[monitors]
startup_relayout = false
new_monitor_delay = 0
[monitors.placem... | [ "monitor HDMI-A-1,1920x1080@60.0,760x0,1.0,transform,0", "monitor DP-1,3440x1440@59.999,0x1080,1.0,transform,0", ]) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_monitor.py | test_disables_monitor | assert_* | collection | 173 | import pytest
import tomllib
from pytest_asyncio import fixture
from .conftest import mocks as tst
from .testtools import wait_called
async def shapeL_config(monkeypatch):
"""L shape."""
config = """
[pyprland]
plugins = ["monitors"]
[monitors]
startup_relayout = false
new_monitor_delay = 0
[monitors.placem... | [ "monitor HDMI-A-1,1920x1080@60.0,0x1440,1.0,transform,0", "monitor DP-1,3440x1440@59.999,0x0,1.0,transform,0", "monitor eDP-1,disable", ]) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_monitor.py | test_3screens_rev_relayout | assert_* | collection | 129 | import pytest
import tomllib
from pytest_asyncio import fixture
from .conftest import mocks as tst
from .testtools import wait_called
async def shapeL_config(monkeypatch):
"""L shape."""
config = """
[pyprland]
plugins = ["monitors"]
[monitors]
startup_relayout = false
new_monitor_delay = 0
[monitors.placem... | [ "monitor HDMI-A-1,1920x1080@60.0,4080x0,1.0,transform,0", "monitor DP-1,3440x1440@59.999,640x0,1.0,transform,0", "monitor eDP-1,640x480@59.999,0x0,1.0,transform,0", ]) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_monitor.py | test_3screens_relayout | assert_* | collection | 129 | import pytest
import tomllib
from pytest_asyncio import fixture
from .conftest import mocks as tst
from .testtools import wait_called
async def shapeL_config(monkeypatch):
"""L shape."""
config = """
[pyprland]
plugins = ["monitors"]
[monitors]
startup_relayout = false
new_monitor_delay = 0
[monitors.placem... | [ "monitor HDMI-A-1,1920x1080@60.0,0x0,1.0,transform,0", "monitor DP-1,3440x1440@59.999,1920x0,1.0,transform,0", "monitor eDP-1,640x480@59.999,5360x0,1.0,transform,0", ]) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_monitor.py | test_shape_l | assert_* | collection | 129 | import pytest
import tomllib
from pytest_asyncio import fixture
from .conftest import mocks as tst
from .testtools import wait_called
async def shapeL_config(monkeypatch):
"""L shape."""
config = """
[pyprland]
plugins = ["monitors"]
[monitors]
startup_relayout = false
new_monitor_delay = 0
[monitors.placem... | [ "monitor HDMI-A-1,1920x1080@60.0,0x480,1.0,transform,0", "monitor DP-1,3440x1440@59.999,1920x480,1.0,transform,0", "monitor eDP-1,640x480@59.999,0x0,1.0,transform,0", ]) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_monitor.py | test_flipped_shape_l | assert_* | collection | 129 | import pytest
import tomllib
from pytest_asyncio import fixture
from .conftest import mocks as tst
from .testtools import wait_called
async def shapeL_config(monkeypatch):
"""L shape."""
config = """
[pyprland]
plugins = ["monitors"]
[monitors]
startup_relayout = false
new_monitor_delay = 0
[monitors.placem... | [ "monitor HDMI-A-1,1920x1080@60.0,0x0,1.0,transform,0", "monitor DP-1,3440x1440@59.999,640x1080,1.0,transform,0", "monitor eDP-1,640x480@59.999,0x1080,1.0,transform,0", ]) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_monitor.py | test_3screens_relayout_b | assert_* | collection | 129 | import pytest
import tomllib
from pytest_asyncio import fixture
from .conftest import mocks as tst
from .testtools import wait_called
async def shapeL_config(monkeypatch):
"""L shape."""
config = """
[pyprland]
plugins = ["monitors"]
[monitors]
startup_relayout = false
new_monitor_delay = 0
[monitors.placem... | [ "monitor HDMI-A-1,1920x1080@60.0,760x0,1.0,transform,0", "monitor DP-1,3440x1440@59.999,0x1080,1.0,transform,0", "monitor eDP-1,640x480@59.999,1400x2520,1.0,transform,0", ]) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_scratchpads.py | test_std | assert | variable | 83 | import asyncio
import pytest
from pytest_asyncio import fixture
from .conftest import mocks
from .testtools import wait_called
def scratchpads(monkeypatch, mocker):
d = {
"pyprland": {"plugins": ["scratchpads"]},
"scratchpads": {
"term": {
"command": "ls",
... | call_set | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_shift_monitors.py | test_shift_positive | assert | numeric_literal | 23 | import pytest
from unittest.mock import Mock, AsyncMock, call
from pyprland.plugins.shift_monitors import Extension
def extension():
ext = Extension("shift_monitors")
ext.backend = AsyncMock()
ext.backend.execute = AsyncMock()
ext.backend.execute_json = AsyncMock()
ext.monitors = ["M1", "M2", "M3"]... | 2 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_shift_monitors.py | test_init | assert | collection | 23 | import pytest
from unittest.mock import Mock, AsyncMock, call
from pyprland.plugins.shift_monitors import Extension
def extension():
ext = Extension("shift_monitors")
ext.backend = AsyncMock()
ext.backend.execute = AsyncMock()
ext.backend.execute_json = AsyncMock()
ext.monitors = ["M1", "M2", "M3"]... | ["A", "B"] | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_shift_monitors.py | test_monitor_events | assert | collection | 22 | import pytest
from unittest.mock import Mock, AsyncMock, call
from pyprland.plugins.shift_monitors import Extension
def extension():
ext = Extension("shift_monitors")
ext.backend = AsyncMock()
ext.backend.execute = AsyncMock()
ext.backend.execute_json = AsyncMock()
ext.monitors = ["M1", "M2", "M3"]... | ["M2", "M3", "M4"] | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_shift_monitors.py | test_monitor_events | assert | collection | 19 | import pytest
from unittest.mock import Mock, AsyncMock, call
from pyprland.plugins.shift_monitors import Extension
def extension():
ext = Extension("shift_monitors")
ext.backend = AsyncMock()
ext.backend.execute = AsyncMock()
ext.backend.execute_json = AsyncMock()
ext.monitors = ["M1", "M2", "M3"]... | ["M1", "M2", "M3", "M4"] | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.