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_plugin_shift_monitors.py | test_shift_positive | assert_* | collection | 25 | 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"]... | [call("swapactiveworkspaces M3 M2"), call("swapactiveworkspaces M2 M1")]) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_shift_monitors.py | test_shift_negative | assert_* | collection | 24 | 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"]... | [call("swapactiveworkspaces M1 M2"), call("swapactiveworkspaces M2 M3")]) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_shortcuts_menu.py | test_run_menu_nested | assert | numeric_literal | 39 | import pytest
from unittest.mock import MagicMock, AsyncMock
from pyprland.plugins.shortcuts_menu import Extension
from pyprland.common import Configuration, SharedState
def extension():
ext = Extension("shortcuts_menu")
ext.state = SharedState()
ext.config = Configuration(
{
"entries":... | 2 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_shortcuts_menu.py | test_run_menu_cancellation | assert | numeric_literal | 33 | import pytest
from unittest.mock import MagicMock, AsyncMock
from pyprland.plugins.shortcuts_menu import Extension
from pyprland.common import Configuration, SharedState
def extension():
ext = Extension("shortcuts_menu")
ext.state = SharedState()
ext.config = Configuration(
{
"entries":... | 1 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_shortcuts_menu.py | test_run_menu_with_skip_single | assert | numeric_literal | 43 | import pytest
from unittest.mock import MagicMock, AsyncMock
from pyprland.plugins.shortcuts_menu import Extension
from pyprland.common import Configuration, SharedState
def extension():
ext = Extension("shortcuts_menu")
ext.state = SharedState()
ext.config = Configuration(
{
"entries":... | 0 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_shortcuts_menu.py | test_run_menu_nested | assert_* | collection | 40 | import pytest
from unittest.mock import MagicMock, AsyncMock
from pyprland.plugins.shortcuts_menu import Extension
from pyprland.common import Configuration, SharedState
def extension():
ext = Extension("shortcuts_menu")
ext.state = SharedState()
ext.config = Configuration(
{
"entries":... | {}) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_shortcuts_menu.py | test_run_menu_formatting | assert | variable | 47 | import pytest
from unittest.mock import MagicMock, AsyncMock
from pyprland.plugins.shortcuts_menu import Extension
from pyprland.common import Configuration, SharedState
def extension():
ext = Extension("shortcuts_menu")
ext.state = SharedState()
ext.config = Configuration(
{
"entries":... | options | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_system_notifier.py | test_on_reload_builtin_parser | assert | numeric_literal | 22 | import pytest
import pytest_asyncio
import asyncio
from unittest.mock import Mock, AsyncMock, call, patch
from pyprland.plugins.system_notifier import Extension, builtin_parsers
async def extension():
ext = Extension("system_notifier")
ext.hyprctl = AsyncMock()
ext.notify = AsyncMock()
ext.log = Mock()... | 1 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_system_notifier.py | test_initialization | assert | collection | 20 | import pytest
import pytest_asyncio
import asyncio
from unittest.mock import Mock, AsyncMock, call, patch
from pyprland.plugins.system_notifier import Extension, builtin_parsers
async def extension():
ext = Extension("system_notifier")
ext.hyprctl = AsyncMock()
ext.notify = AsyncMock()
ext.log = Mock()... | [] | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_system_notifier.py | test_initialization | assert | collection | 21 | import pytest
import pytest_asyncio
import asyncio
from unittest.mock import Mock, AsyncMock, call, patch
from pyprland.plugins.system_notifier import Extension, builtin_parsers
async def extension():
ext = Extension("system_notifier")
ext.hyprctl = AsyncMock()
ext.notify = AsyncMock()
ext.log = Mock()... | {} | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_system_notifier.py | test_notify_send_option | assert | numeric_literal | 39 | import pytest
import pytest_asyncio
import asyncio
from unittest.mock import Mock, AsyncMock, call, patch
from pyprland.plugins.system_notifier import Extension, builtin_parsers
async def extension():
ext = Extension("system_notifier")
ext.hyprctl = AsyncMock()
ext.notify = AsyncMock()
ext.log = Mock()... | 2000 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_system_notifier.py | test_exit_cleanup | assert | bool_literal | 30 | import pytest
import pytest_asyncio
import asyncio
from unittest.mock import Mock, AsyncMock, call, patch
from pyprland.plugins.system_notifier import Extension, builtin_parsers
async def extension():
ext = Extension("system_notifier")
ext.hyprctl = AsyncMock()
ext.notify = AsyncMock()
ext.log = Mock()... | False | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_system_notifier.py | test_notify_send_option | assert | string_literal | 38 | import pytest
import pytest_asyncio
import asyncio
from unittest.mock import Mock, AsyncMock, call, patch
from pyprland.plugins.system_notifier import Extension, builtin_parsers
async def extension():
ext = Extension("system_notifier")
ext.hyprctl = AsyncMock()
ext.notify = AsyncMock()
ext.log = Mock()... | "Match me" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_system_notifier.py | test_on_reload_builtin_parser | assert | complex_expr | 21 | import pytest
import pytest_asyncio
import asyncio
from unittest.mock import Mock, AsyncMock, call, patch
from pyprland.plugins.system_notifier import Extension, builtin_parsers
async def extension():
ext = Extension("system_notifier")
ext.hyprctl = AsyncMock()
ext.notify = AsyncMock()
ext.log = Mock()... | extension.parsers | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_system_notifier.py | test_parser_matching | assert_* | string_literal | 75 | import pytest
import pytest_asyncio
import asyncio
from unittest.mock import Mock, AsyncMock, call, patch
from pyprland.plugins.system_notifier import Extension, builtin_parsers
async def extension():
ext = Extension("system_notifier")
ext.hyprctl = AsyncMock()
ext.notify = AsyncMock()
ext.log = Mock()... | "Something failed: Database connection lost") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_toggle_dpms.py | test_run_toggle_dpms_on | assert_* | string_literal | 29 | import pytest
from pytest_asyncio import fixture
from unittest.mock import AsyncMock
from pyprland.plugins.toggle_dpms import Extension
def extension():
ext = Extension("toggle_dpms")
ext.backend = AsyncMock()
# Mocking monitor list
ext.backend.execute_json = AsyncMock(return_value=[{"name": "DP-1", "... | "dpms on") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_toggle_dpms.py | test_run_toggle_dpms_off | assert_* | string_literal | 20 | import pytest
from pytest_asyncio import fixture
from unittest.mock import AsyncMock
from pyprland.plugins.toggle_dpms import Extension
def extension():
ext = Extension("toggle_dpms")
ext.backend = AsyncMock()
# Mocking monitor list
ext.backend.execute_json = AsyncMock(return_value=[{"name": "DP-1", "... | "dpms off") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_toggle_special.py | test_run_toggle_special_restore | assert_* | variable | 29 | import pytest
from unittest.mock import Mock, AsyncMock
from pyprland.plugins.toggle_special import Extension
from pyprland.common import SharedState
def extension():
ext = Extension("toggle_special")
ext.state = SharedState()
ext.state.active_workspace = "1"
ext.backend = AsyncMock()
return ext
... | expected_calls) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_toggle_special.py | test_run_toggle_special_minimize | assert_* | string_literal | 23 | import pytest
from unittest.mock import Mock, AsyncMock
from pyprland.plugins.toggle_special import Extension
from pyprland.common import SharedState
def extension():
ext = Extension("toggle_special")
ext.state = SharedState()
ext.state.active_workspace = "1"
ext.backend = AsyncMock()
return ext
... | "movetoworkspacesilent special:minimized,address:0x123") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_wallpapers.py | test_on_reload | assert | numeric_literal | 40 | import pytest
import os
import asyncio
from unittest.mock import Mock, AsyncMock, patch, MagicMock
from pyprland.plugins.wallpapers import Extension
from pyprland.common import Configuration, SharedState
def extension(mocker):
# Mock global state variables that might be accessed
ext = Extension("wallpapers")
... | 2 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_wallpapers.py | test_run_wall_next | assert | bool_literal | 28 | import pytest
import os
import asyncio
from unittest.mock import Mock, AsyncMock, patch, MagicMock
from pyprland.plugins.wallpapers import Extension
from pyprland.common import Configuration, SharedState
def extension(mocker):
# Mock global state variables that might be accessed
ext = Extension("wallpapers")
... | False | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_wallpapers.py | test_detect_theme | assert | string_literal | 33 | import pytest
import os
import asyncio
from unittest.mock import Mock, AsyncMock, patch, MagicMock
from pyprland.plugins.wallpapers import Extension
from pyprland.common import Configuration, SharedState
def extension(mocker):
# Mock global state variables that might be accessed
ext = Extension("wallpapers")
... | "dark" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_wallpapers.py | test_material_palette_generation | assert | variable | 42 | import pytest
import os
import asyncio
from unittest.mock import Mock, AsyncMock, patch, MagicMock
from pyprland.plugins.wallpapers import Extension
from pyprland.common import Configuration, SharedState
def extension(mocker):
# Mock global state variables that might be accessed
ext = Extension("wallpapers")
... | palette | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_wallpapers.py | test_on_reload | assert | complex_expr | 41 | import pytest
import os
import asyncio
from unittest.mock import Mock, AsyncMock, patch, MagicMock
from pyprland.plugins.wallpapers import Extension
from pyprland.common import Configuration, SharedState
def extension(mocker):
# Mock global state variables that might be accessed
ext = Extension("wallpapers")
... | extension.image_list | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_plugin_wallpapers.py | test_select_next_image | assert | string_literal | 29 | import pytest
import os
import asyncio
from unittest.mock import Mock, AsyncMock, patch, MagicMock
from pyprland.plugins.wallpapers import Extension
from pyprland.common import Configuration, SharedState
def extension(mocker):
# Mock global state variables that might be accessed
ext = Extension("wallpapers")
... | "/tmp/wallpapers/wp2.jpg" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_pyprland.py | test_reload | assert | collection | 43 | import asyncio
from typing import cast
from unittest.mock import Mock
import pytest
import tomllib
from .conftest import mocks as tst
from .testtools import wait_called
@pytest.mark.usefixtures("sample1_config", "server_fixture")
@pytest.mark.asyncio
async def test_reload(monkeypatch):
config = """
[pyprland]
pl... | {} | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_pyprland.py | test_reload | assert | bool_literal | 42 | import asyncio
from typing import cast
from unittest.mock import Mock
import pytest
import tomllib
from .conftest import mocks as tst
from .testtools import wait_called
@pytest.mark.usefixtures("sample1_config", "server_fixture")
@pytest.mark.asyncio
async def test_reload(monkeypatch):
config = """
[pyprland]
pl... | True | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_pyprland.py | test_reload | assert | complex_expr | 40 | import asyncio
from typing import cast
from unittest.mock import Mock
import pytest
import tomllib
from .conftest import mocks as tst
from .testtools import wait_called
@pytest.mark.usefixtures("sample1_config", "server_fixture")
@pytest.mark.asyncio
async def test_reload(monkeypatch):
config = """
[pyprland]
pl... | cfg["placement"] | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_pyprland.py | test_reload | assert | complex_expr | 41 | import asyncio
from typing import cast
from unittest.mock import Mock
import pytest
import tomllib
from .conftest import mocks as tst
from .testtools import wait_called
@pytest.mark.usefixtures("sample1_config", "server_fixture")
@pytest.mark.asyncio
async def test_reload(monkeypatch):
config = """
[pyprland]
pl... | cfg["startup_relayout"] | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_scratchpad_vulnerabilities.py | test_zombie_process_recovery | assert | numeric_literal | 195 | import asyncio
import pytest
from pytest_asyncio import fixture
from .conftest import mocks
from .testtools import wait_called
from unittest.mock import AsyncMock
def multi_scratchpads(monkeypatch, mocker):
d = {
"pyprland": {"plugins": ["scratchpads"]},
"scratchpads": {
"term": {
... | 2 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_scratchpad_vulnerabilities.py | test_zombie_process_recovery | assert | numeric_literal | 148 | import asyncio
import pytest
from pytest_asyncio import fixture
from .conftest import mocks
from .testtools import wait_called
from unittest.mock import AsyncMock
def multi_scratchpads(monkeypatch, mocker):
d = {
"pyprland": {"plugins": ["scratchpads"]},
"scratchpads": {
"term": {
... | 3001 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_scratchpad_vulnerabilities.py | test_zombie_process_recovery | assert | numeric_literal | 190 | import asyncio
import pytest
from pytest_asyncio import fixture
from .conftest import mocks
from .testtools import wait_called
from unittest.mock import AsyncMock
def multi_scratchpads(monkeypatch, mocker):
d = {
"pyprland": {"plugins": ["scratchpads"]},
"scratchpads": {
"term": {
... | 3002 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_string_template.py | test_templates | assert | string_literal | 6 | def test_templates():
"""Test the template function."""
from pyprland.common import apply_variables
assert apply_variables("[one] $var [two] ${var2} [three]", {"one": "X", "three": "Y"}) == | "X $var [two] ${var2} Y" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_string_template.py | test_templates | assert | string_literal | 7 | def test_templates():
"""Test the template function."""
from pyprland.common import apply_variables
assert apply_variables("[one] $var [two] ${var2} [three]", {"one": "X", "three": "Y"}) == "X $var [two] ${var2} Y"
assert | "Y $one one X ${var2} [one other thing] X Y" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_colors.py | test_find_peaks | assert | numeric_literal | 43 | import pytest
import math
from unittest.mock import Mock, patch, MagicMock
from pyprland.plugins.wallpapers.colorutils import (
_build_hue_histogram,
_smooth_histogram,
_find_peaks,
_get_best_pixel_for_hue,
_calculate_hue_diff,
_select_colors_from_peaks,
get_dominant_colors,
nicify_oklab... | 2 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_colors.py | test_select_colors_from_peaks | assert | numeric_literal | 44 | import pytest
import math
from unittest.mock import Mock, patch, MagicMock
from pyprland.plugins.wallpapers.colorutils import (
_build_hue_histogram,
_smooth_histogram,
_find_peaks,
_get_best_pixel_for_hue,
_calculate_hue_diff,
_select_colors_from_peaks,
get_dominant_colors,
nicify_oklab... | 3 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_colors.py | test_nicify_oklab | assert | numeric_literal | 35 | import pytest
import math
from unittest.mock import Mock, patch, MagicMock
from pyprland.plugins.wallpapers.colorutils import (
_build_hue_histogram,
_smooth_histogram,
_find_peaks,
_get_best_pixel_for_hue,
_calculate_hue_diff,
_select_colors_from_peaks,
get_dominant_colors,
nicify_oklab... | 0 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_colors.py | test_build_hue_histogram | assert | collection | 49 | import pytest
import math
from unittest.mock import Mock, patch, MagicMock
from pyprland.plugins.wallpapers.colorutils import (
_build_hue_histogram,
_smooth_histogram,
_find_peaks,
_get_best_pixel_for_hue,
_calculate_hue_diff,
_select_colors_from_peaks,
get_dominant_colors,
nicify_oklab... | [] | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_colors.py | test_calculate_hue_diff | assert | numeric_literal | 32 | import pytest
import math
from unittest.mock import Mock, patch, MagicMock
from pyprland.plugins.wallpapers.colorutils import (
_build_hue_histogram,
_smooth_histogram,
_find_peaks,
_get_best_pixel_for_hue,
_calculate_hue_diff,
_select_colors_from_peaks,
get_dominant_colors,
nicify_oklab... | 10 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_colors.py | test_calculate_hue_diff | assert | numeric_literal | 34 | import pytest
import math
from unittest.mock import Mock, patch, MagicMock
from pyprland.plugins.wallpapers.colorutils import (
_build_hue_histogram,
_smooth_histogram,
_find_peaks,
_get_best_pixel_for_hue,
_calculate_hue_diff,
_select_colors_from_peaks,
get_dominant_colors,
nicify_oklab... | 16 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_colors.py | test_color_scheme_props_default | assert | collection | 35 | import pytest
import math
from unittest.mock import Mock, patch, MagicMock
from pyprland.plugins.wallpapers.colorutils import (
_build_hue_histogram,
_smooth_histogram,
_find_peaks,
_get_best_pixel_for_hue,
_calculate_hue_diff,
_select_colors_from_peaks,
get_dominant_colors,
nicify_oklab... | {} | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_colors.py | test_build_hue_histogram | assert | collection | 45 | import pytest
import math
from unittest.mock import Mock, patch, MagicMock
from pyprland.plugins.wallpapers.colorutils import (
_build_hue_histogram,
_smooth_histogram,
_find_peaks,
_get_best_pixel_for_hue,
_calculate_hue_diff,
_select_colors_from_peaks,
get_dominant_colors,
nicify_oklab... | [0] | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_colors.py | test_build_hue_histogram | assert | numeric_literal | 48 | import pytest
import math
from unittest.mock import Mock, patch, MagicMock
from pyprland.plugins.wallpapers.colorutils import (
_build_hue_histogram,
_smooth_histogram,
_find_peaks,
_get_best_pixel_for_hue,
_calculate_hue_diff,
_select_colors_from_peaks,
get_dominant_colors,
nicify_oklab... | 0.0 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_colors.py | test_smooth_histogram | assert | numeric_literal | 39 | import pytest
import math
from unittest.mock import Mock, patch, MagicMock
from pyprland.plugins.wallpapers.colorutils import (
_build_hue_histogram,
_smooth_histogram,
_find_peaks,
_get_best_pixel_for_hue,
_calculate_hue_diff,
_select_colors_from_peaks,
get_dominant_colors,
nicify_oklab... | 6.0 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_colors.py | test_smooth_histogram | assert | numeric_literal | 41 | import pytest
import math
from unittest.mock import Mock, patch, MagicMock
from pyprland.plugins.wallpapers.colorutils import (
_build_hue_histogram,
_smooth_histogram,
_find_peaks,
_get_best_pixel_for_hue,
_calculate_hue_diff,
_select_colors_from_peaks,
get_dominant_colors,
nicify_oklab... | 4.0 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_colors.py | test_calculate_hue_diff | assert | numeric_literal | 38 | import pytest
import math
from unittest.mock import Mock, patch, MagicMock
from pyprland.plugins.wallpapers.colorutils import (
_build_hue_histogram,
_smooth_histogram,
_find_peaks,
_get_best_pixel_for_hue,
_calculate_hue_diff,
_select_colors_from_peaks,
get_dominant_colors,
nicify_oklab... | 128 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_colors.py | test_calculate_hue_diff | assert | numeric_literal | 39 | import pytest
import math
from unittest.mock import Mock, patch, MagicMock
from pyprland.plugins.wallpapers.colorutils import (
_build_hue_histogram,
_smooth_histogram,
_find_peaks,
_get_best_pixel_for_hue,
_calculate_hue_diff,
_select_colors_from_peaks,
get_dominant_colors,
nicify_oklab... | 127 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_colors.py | test_apply_filters | assert | variable | 45 | import pytest
import math
from unittest.mock import Mock, patch, MagicMock
from pyprland.plugins.wallpapers.colorutils import (
_build_hue_histogram,
_smooth_histogram,
_find_peaks,
_get_best_pixel_for_hue,
_calculate_hue_diff,
_select_colors_from_peaks,
get_dominant_colors,
nicify_oklab... | res | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_imageutils.py | test_get_variant_color | assert | numeric_literal | 22 | import pytest
import os
from unittest.mock import Mock, patch, AsyncMock
from pyprland.plugins.wallpapers.imageutils import (
expand_path,
get_files_with_ext,
MonitorInfo,
RoundedImageManager,
to_hex,
to_rgb,
to_rgba,
get_variant_color,
IMAGE_FORMAT,
)
def test_get_variant_color():
... | 0 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_imageutils.py | test_get_files_with_ext | assert | numeric_literal | 50 | import pytest
import os
from unittest.mock import Mock, patch, AsyncMock
from pyprland.plugins.wallpapers.imageutils import (
expand_path,
get_files_with_ext,
MonitorInfo,
RoundedImageManager,
to_hex,
to_rgb,
to_rgba,
get_variant_color,
IMAGE_FORMAT,
)
@pytest.mark.asyncio
async def... | 1 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_imageutils.py | test_get_files_with_ext | assert | numeric_literal | 57 | import pytest
import os
from unittest.mock import Mock, patch, AsyncMock
from pyprland.plugins.wallpapers.imageutils import (
expand_path,
get_files_with_ext,
MonitorInfo,
RoundedImageManager,
to_hex,
to_rgb,
to_rgba,
get_variant_color,
IMAGE_FORMAT,
)
@pytest.mark.asyncio
async def... | 2 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_imageutils.py | test_get_variant_color | assert | numeric_literal | 21 | import pytest
import os
from unittest.mock import Mock, patch, AsyncMock
from pyprland.plugins.wallpapers.imageutils import (
expand_path,
get_files_with_ext,
MonitorInfo,
RoundedImageManager,
to_hex,
to_rgb,
to_rgba,
get_variant_color,
IMAGE_FORMAT,
)
def test_get_variant_color():
... | 255 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_imageutils.py | test_rounded_image_manager_paths | assert | variable | 25 | import pytest
import os
from unittest.mock import Mock, patch, AsyncMock
from pyprland.plugins.wallpapers.imageutils import (
expand_path,
get_files_with_ext,
MonitorInfo,
RoundedImageManager,
to_hex,
to_rgb,
to_rgba,
get_variant_color,
IMAGE_FORMAT,
)
def test_rounded_image_manager... | path | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_imageutils.py | test_rounded_image_manager_processing | assert_* | variable | 55 | import pytest
import os
from unittest.mock import Mock, patch, AsyncMock
from pyprland.plugins.wallpapers.imageutils import (
expand_path,
get_files_with_ext,
MonitorInfo,
RoundedImageManager,
to_hex,
to_rgb,
to_rgba,
get_variant_color,
IMAGE_FORMAT,
)
def test_rounded_image_manager... | dest) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_imageutils.py | test_expand_path | assert | variable | 21 | import pytest
import os
from unittest.mock import Mock, patch, AsyncMock
from pyprland.plugins.wallpapers.imageutils import (
expand_path,
get_files_with_ext,
MonitorInfo,
RoundedImageManager,
to_hex,
to_rgb,
to_rgba,
get_variant_color,
IMAGE_FORMAT,
)
def test_expand_path():
wi... | expanded | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_imageutils.py | test_color_conversions | assert | string_literal | 18 | import pytest
import os
from unittest.mock import Mock, patch, AsyncMock
from pyprland.plugins.wallpapers.imageutils import (
expand_path,
get_files_with_ext,
MonitorInfo,
RoundedImageManager,
to_hex,
to_rgb,
to_rgba,
get_variant_color,
IMAGE_FORMAT,
)
def test_color_conversions():
... | "#ff0000" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_imageutils.py | test_color_conversions | assert | string_literal | 19 | import pytest
import os
from unittest.mock import Mock, patch, AsyncMock
from pyprland.plugins.wallpapers.imageutils import (
expand_path,
get_files_with_ext,
MonitorInfo,
RoundedImageManager,
to_hex,
to_rgb,
to_rgba,
get_variant_color,
IMAGE_FORMAT,
)
def test_color_conversions():
... | "#00ff00" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_imageutils.py | test_color_conversions | assert | string_literal | 20 | import pytest
import os
from unittest.mock import Mock, patch, AsyncMock
from pyprland.plugins.wallpapers.imageutils import (
expand_path,
get_files_with_ext,
MonitorInfo,
RoundedImageManager,
to_hex,
to_rgb,
to_rgba,
get_variant_color,
IMAGE_FORMAT,
)
def test_color_conversions():
... | "#0000ff" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_imageutils.py | test_color_conversions | assert | string_literal | 22 | import pytest
import os
from unittest.mock import Mock, patch, AsyncMock
from pyprland.plugins.wallpapers.imageutils import (
expand_path,
get_files_with_ext,
MonitorInfo,
RoundedImageManager,
to_hex,
to_rgb,
to_rgba,
get_variant_color,
IMAGE_FORMAT,
)
def test_color_conversions():
... | "rgb(255, 0, 0)" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_imageutils.py | test_expand_path | assert | string_literal | 27 | import pytest
import os
from unittest.mock import Mock, patch, AsyncMock
from pyprland.plugins.wallpapers.imageutils import (
expand_path,
get_files_with_ext,
MonitorInfo,
RoundedImageManager,
to_hex,
to_rgb,
to_rgba,
get_variant_color,
IMAGE_FORMAT,
)
def test_expand_path():
wi... | "/home/user/path" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_imageutils.py | test_rounded_image_manager_processing | assert_* | string_literal | 47 | import pytest
import os
from unittest.mock import Mock, patch, AsyncMock
from pyprland.plugins.wallpapers.imageutils import (
expand_path,
get_files_with_ext,
MonitorInfo,
RoundedImageManager,
to_hex,
to_rgb,
to_rgba,
get_variant_color,
IMAGE_FORMAT,
)
def test_rounded_image_manager... | "/path/to/img.jpg") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_imageutils.py | test_color_conversions | assert | string_literal | 23 | import pytest
import os
from unittest.mock import Mock, patch, AsyncMock
from pyprland.plugins.wallpapers.imageutils import (
expand_path,
get_files_with_ext,
MonitorInfo,
RoundedImageManager,
to_hex,
to_rgb,
to_rgba,
get_variant_color,
IMAGE_FORMAT,
)
def test_color_conversions():
... | "rgba(255, 0, 0, 1.0)" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_wallpapers_imageutils.py | test_rounded_image_manager_paths | assert | string_literal | 22 | import pytest
import os
from unittest.mock import Mock, patch, AsyncMock
from pyprland.plugins.wallpapers.imageutils import (
expand_path,
get_files_with_ext,
MonitorInfo,
RoundedImageManager,
to_hex,
to_rgb,
to_rgba,
get_variant_color,
IMAGE_FORMAT,
)
def test_rounded_image_manager... | "0:1.0x1920x1080:/path/to/img.jpg" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_chord.py | test_chord | assert | numeric_literal | 7 | import isobar as iso
def test_chord():
chord = iso.Chord([3, 4, 3])
assert chord.intervals == [3, 4, 3]
assert chord.root == | 0 | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_chord.py | test_chord | assert | numeric_literal | 12 | import isobar as iso
def test_chord():
chord = iso.Chord([3, 4, 3])
assert chord.intervals == [3, 4, 3]
assert chord.root == 0
assert chord.semitones == [0, 3, 7, 10]
chord = iso.Chord([3, 4, 3], root=3)
assert chord.intervals == [3, 4, 3]
assert chord.root == | 3 | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_chord.py | test_chord | assert | collection | 6 | import isobar as iso
def test_chord():
chord = iso.Chord([3, 4, 3])
assert chord.intervals == | [3, 4, 3] | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_chord.py | test_chord | assert | collection | 8 | import isobar as iso
def test_chord():
chord = iso.Chord([3, 4, 3])
assert chord.intervals == [3, 4, 3]
assert chord.root == 0
assert chord.semitones == | [0, 3, 7, 10] | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_io_midi.py | test_io_midi | assert | numeric_literal | 34 | import isobar as iso
from isobar.io.midi import MidiInputDevice, MidiOutputDevice
import pytest
import time
from . import dummy_timeline
VIRTUAL_DEVICE_NAME = "Virtual Device"
no_midi = False
@pytest.mark.skipif(no_midi, reason="Device does not have MIDI support")
def test_io_midi():
"""
Send a MIDI message ... | 1 | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_io_midi.py | test_io_midi_sync | pytest.approx | complex_expr | 24 | import isobar as iso
from isobar.io.midi import MidiInputDevice, MidiOutputDevice
import pytest
import time
from . import dummy_timeline
VIRTUAL_DEVICE_NAME = "Virtual Device"
no_midi = False
@pytest.mark.skipif(no_midi, reason="Device does not have MIDI support")
def test_io_midi_sync():
tempo = 150
midi_ou... | tempo, rel=0.03) | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_io_midi.py | test_io_midi_sync | assert | func_call | 24 | import isobar as iso
from isobar.io.midi import MidiInputDevice, MidiOutputDevice
import pytest
import time
from . import dummy_timeline
VIRTUAL_DEVICE_NAME = "Virtual Device"
no_midi = False
@pytest.mark.skipif(no_midi, reason="Device does not have MIDI support")
def test_io_midi_sync():
tempo = 150
midi_ou... | pytest.approx(tempo, rel=0.03) | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_io_midifile.py | test_io_midifile_write | assert | func_call | 26 | import os
import isobar as iso
from isobar.io.midifile import MidiFileOutputDevice, MidiFileInputDevice
import pytest
from . import dummy_timeline
def test_io_midifile_write(dummy_timeline):
events = {
iso.EVENT_NOTE: iso.PSequence([60, 62, 64, 67], 1),
iso.EVENT_DURATION: iso.PSequence([0.5, 1.5, ... | list(events[key]) | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_key.py | test_key_defaults | assert | numeric_literal | 7 | import isobar as iso
import pytest
def test_key_defaults():
a = iso.Key()
assert a.get(0) == | 0 | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_key.py | test_key_defaults | assert | numeric_literal | 8 | import isobar as iso
import pytest
def test_key_defaults():
a = iso.Key()
assert a.get(0) == 0
assert a.get(1) == | 2 | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_key.py | test_key_eq | assert | variable | 8 | import isobar as iso
import pytest
def test_key_eq():
a = iso.Key()
b = iso.Key(0, iso.Scale([0, 2, 4, 5, 7, 9, 11]))
assert a == | b | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_key.py | test_key_eq | assert | variable | 10 | import isobar as iso
import pytest
def test_key_eq():
a = iso.Key()
b = iso.Key(0, iso.Scale([0, 2, 4, 5, 7, 9, 11]))
assert a == b
c = iso.Key(0, iso.Scale([0, 2, 3, 5, 7, 9, 11]))
assert a != | c | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_key.py | test_key_eq | assert | variable | 12 | import isobar as iso
import pytest
def test_key_eq():
a = iso.Key()
b = iso.Key(0, iso.Scale([0, 2, 4, 5, 7, 9, 11]))
assert a == b
c = iso.Key(0, iso.Scale([0, 2, 3, 5, 7, 9, 11]))
assert a != c
d = iso.Key(1, iso.Scale([0, 2, 4, 5, 7, 9, 11]))
assert a != | d | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_key.py | test_key_contains | assert | variable | 7 | import isobar as iso
import pytest
def test_key_contains():
a = iso.Key("C", "major")
assert 0 in | a | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_key.py | test_key_nearest_note | assert | numeric_literal | 10 | import isobar as iso
import pytest
def test_key_nearest_note():
a = iso.Key("C", "minor")
assert a.nearest_note(0) == 0
assert a.nearest_note(1) == 0
assert a.nearest_note(2) == 2
assert a.nearest_note(3) == | 3 | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_key.py | test_key_random | assert | numeric_literal | 9 | import isobar as iso
import pytest
def test_key_random():
a = iso.Key.random()
assert a.tonic >= 0 and a.tonic < 12
assert len(a.semitones) > 0
assert len(a.semitones) <= | 12 | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_key.py | test_key_get | assert | complex_expr | 7 | import isobar as iso
import pytest
def test_key_get():
a = iso.Key("C", "major")
assert a.get(0) == | a[0] | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_key.py | test_key_get | assert | complex_expr | 8 | import isobar as iso
import pytest
def test_key_get():
a = iso.Key("C", "major")
assert a.get(0) == a[0] == 0
assert a.get(1) == | a[1] | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern.py | test_pattern_stopiteration | assert | numeric_literal | 7 | import pytest
import isobar as iso
def test_pattern_stopiteration():
p = iso.PSequence([1, 2, 3], 1)
assert next(p) == | 1 | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern.py | test_pattern_stopiteration | assert | numeric_literal | 8 | import pytest
import isobar as iso
def test_pattern_stopiteration():
p = iso.PSequence([1, 2, 3], 1)
assert next(p) == 1
assert next(p) == | 2 | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern.py | test_pattern_stopiteration | assert | numeric_literal | 9 | import pytest
import isobar as iso
def test_pattern_stopiteration():
p = iso.PSequence([1, 2, 3], 1)
assert next(p) == 1
assert next(p) == 2
assert next(p) == | 3 | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern.py | test_pattern_len | assert | numeric_literal | 10 | import pytest
import isobar as iso
def test_pattern_len():
p = iso.PSequence([1, 2, 3], 1)
assert len(p) == 3
p = iso.PSequence([1, 2, 3], 0)
assert len(p) == | 0 | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern.py | test_pattern_value | assert | collection | 14 | import pytest
import isobar as iso
def test_pattern_value():
p1 = iso.PSequence([1, 2, 3], 1)
assert iso.Pattern.value(p1) == 1
p1 = iso.PSequence([1, 2, 3], 1)
p2 = iso.PSequence([ p1 ])
assert iso.Pattern.value(p2) == 1
assert iso.Pattern.value(1) == 1
assert iso.Pattern.value([1]) == | [1] | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern.py | test_pattern_timeline | assert | none_literal | 7 | import pytest
import isobar as iso
def test_pattern_timeline():
p = iso.PSequence([1, 2, 3], 1)
assert p.timeline is | None | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern.py | test_pattern_all | assert | collection | 13 | import pytest
import isobar as iso
def test_pattern_all():
p = iso.PSequence([1, 2, 3], 1)
assert p.all() == [1, 2, 3]
# check that the sequence is reset afterwards
assert p.all() == [1, 2, 3]
p = iso.PSequence([1, 2, 3], 1)
assert p.all(2) == | [1, 2] | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern.py | test_pattern_copy | assert | func_call | 8 | import pytest
import isobar as iso
def test_pattern_copy():
p1 = iso.PSequence([1, 2, 3], 1)
p2 = p1.copy()
assert p1.all() == | p2.all() | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern.py | test_pattern_iter | assert | collection | 9 | import pytest
import isobar as iso
def test_pattern_iter():
p = iso.PSequence([1, 2, 3], 1)
i = iter(p)
o = list(i)
assert o == | [1, 2, 3] | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern_chance.py | test_pbrown | assert | variable | 9 | import pytest
import isobar as iso
def test_pbrown():
a = iso.PBrown(0, iso.PConstant(5), iso.PConstant(-5), iso.PConstant(5))
a.seed(0)
expected = [0, 1, 2, -3, -4, -1, 1, 2, 1, 3, 3, 5, 3, 5, 2, 1, -2, -5, -1, -2]
assert a.nextn(20) == | expected | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern_core.py | test_pref | assert | numeric_literal | 9 | import pytest
import isobar as iso
def test_pref():
a = iso.PSequence([1, 2, 3], 1)
b = iso.PSequence([4, 5, 6], 1)
c = iso.PRef(a)
assert next(c) == | 1 | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern_core.py | test_pref | assert | numeric_literal | 10 | import pytest
import isobar as iso
def test_pref():
a = iso.PSequence([1, 2, 3], 1)
b = iso.PSequence([4, 5, 6], 1)
c = iso.PRef(a)
assert next(c) == 1
assert next(c) == | 2 | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern_core.py | test_pref | assert | numeric_literal | 12 | import pytest
import isobar as iso
def test_pref():
a = iso.PSequence([1, 2, 3], 1)
b = iso.PSequence([4, 5, 6], 1)
c = iso.PRef(a)
assert next(c) == 1
assert next(c) == 2
c.pattern = b
assert next(c) == | 4 | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern_core.py | test_pref | assert | numeric_literal | 13 | import pytest
import isobar as iso
def test_pref():
a = iso.PSequence([1, 2, 3], 1)
b = iso.PSequence([4, 5, 6], 1)
c = iso.PRef(a)
assert next(c) == 1
assert next(c) == 2
c.pattern = b
assert next(c) == 4
assert next(c) == | 5 | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern_core.py | test_pref | assert | numeric_literal | 14 | import pytest
import isobar as iso
def test_pref():
a = iso.PSequence([1, 2, 3], 1)
b = iso.PSequence([4, 5, 6], 1)
c = iso.PRef(a)
assert next(c) == 1
assert next(c) == 2
c.pattern = b
assert next(c) == 4
assert next(c) == 5
assert next(c) == | 6 | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern_core.py | test_parrayindex | assert | numeric_literal | 9 | import pytest
import isobar as iso
def test_parrayindex():
ar = iso.PSequence([[0, 1, 2, 3, 4], [0, 1, 4, 9, 16]])
a = iso.PSequence([0, 2, 4], 1)
b = iso.PArrayIndex(ar, a)
assert next(b) == | 0 | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern_core.py | test_pfunc | assert | string_literal | 9 | import pytest
import isobar as iso
def test_pfunc():
s = "abc"
a = iso.PSequence([0, 1, 2], 1)
b = iso.PFunc(lambda: s[next(a)])
assert next(b) == | 'a' | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern_core.py | test_pfunc | assert | string_literal | 10 | import pytest
import isobar as iso
def test_pfunc():
s = "abc"
a = iso.PSequence([0, 1, 2], 1)
b = iso.PFunc(lambda: s[next(a)])
assert next(b) == 'a'
assert next(b) == | 'b' | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
ideoforms/isobar | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | train | train | tests/test_pattern_core.py | test_pfunc | assert | string_literal | 11 | import pytest
import isobar as iso
def test_pfunc():
s = "abc"
a = iso.PSequence([0, 1, 2], 1)
b = iso.PFunc(lambda: s[next(a)])
assert next(b) == 'a'
assert next(b) == 'b'
assert next(b) == | 'c' | 92601c8db7a9107ff3b9f8d480b8cd21415c0915 | 87 | v2_extractor_at_anchor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.