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
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_confirm.py
test_confirm_enter_default_no
assert
bool_literal
12
import pytest from tests.utils import KeyInputs from tests.utils import feed_cli_with_input def test_confirm_enter_default_no(): message = "Foo message" text = KeyInputs.ENTER + "\r" result, cli = feed_cli_with_input("confirm", message, text, default=False) assert result is
False
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_confirm.py
test_confirm_ctr_c
pytest.raises
variable
11
import pytest from tests.utils import KeyInputs from tests.utils import feed_cli_with_input def test_confirm_ctr_c(): message = "Foo message" text = KeyInputs.CONTROLC with pytest.raises(
KeyboardInterrupt)
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_password.py
test_password_entry
assert
string_literal
9
from tests.utils import feed_cli_with_input def test_password_entry(): message = "What is your password" text = "my password\r" result, cli = feed_cli_with_input("password", message, text) assert result ==
"my password"
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_path.py
test_get_paths
assert
string_literal
47
import prompt_toolkit import pytest from prompt_toolkit.completion import Completer from prompt_toolkit.completion import Completion from tests.utils import KeyInputs from tests.utils import feed_cli_with_input def path_completion_tree(tmp_path): needed_directories = [ tmp_path / "foo", tmp_path /...
"baz.any"
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_path.py
test_path
assert
string_literal
31
import prompt_toolkit import pytest from prompt_toolkit.completion import Completer from prompt_toolkit.completion import Completion from tests.utils import KeyInputs from tests.utils import feed_cli_with_input def path_completion_tree(tmp_path): needed_directories = [ tmp_path / "foo", tmp_path /...
"myfile.py"
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_path.py
test_get_paths_validation
pytest.raises
variable
39
import prompt_toolkit import pytest from prompt_toolkit.completion import Completer from prompt_toolkit.completion import Completion from tests.utils import KeyInputs from tests.utils import feed_cli_with_input def path_completion_tree(tmp_path): needed_directories = [ tmp_path / "foo", tmp_path /...
ValueError)
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_path.py
test_get_paths_validation
assert
func_call
47
import prompt_toolkit import pytest from prompt_toolkit.completion import Completer from prompt_toolkit.completion import Completion from tests.utils import KeyInputs from tests.utils import feed_cli_with_input def path_completion_tree(tmp_path): needed_directories = [ tmp_path / "foo", tmp_path /...
str(excinfo)
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_path.py
test_complete_custom_completer
assert
string_literal
43
import prompt_toolkit import pytest from prompt_toolkit.completion import Completer from prompt_toolkit.completion import Completion from tests.utils import KeyInputs from tests.utils import feed_cli_with_input def path_completion_tree(tmp_path): needed_directories = [ tmp_path / "foo", tmp_path /...
"baz" + test_path
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_path.py
test_complete_path
assert
func_call
40
import prompt_toolkit import pytest from prompt_toolkit.completion import Completer from prompt_toolkit.completion import Completion from tests.utils import KeyInputs from tests.utils import feed_cli_with_input def path_completion_tree(tmp_path): needed_directories = [ tmp_path / "foo", tmp_path /...
str(path_completion_tree / "baz")
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_path.py
test_complete_requires_explicit_enter
assert
func_call
43
import prompt_toolkit import pytest from prompt_toolkit.completion import Completer from prompt_toolkit.completion import Completion from tests.utils import KeyInputs from tests.utils import feed_cli_with_input def path_completion_tree(tmp_path): needed_directories = [ tmp_path / "foo", tmp_path /...
str(path_completion_tree / "baz" / "foo")
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_path.py
test_complete_path_directories_only
assert
func_call
38
import prompt_toolkit import pytest from prompt_toolkit.completion import Completer from prompt_toolkit.completion import Completion from tests.utils import KeyInputs from tests.utils import feed_cli_with_input def path_completion_tree(tmp_path): needed_directories = [ tmp_path / "foo", tmp_path /...
str(path_completion_tree / "foo" / "buz")
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_rawselect.py
test_legacy_name
assert
string_literal
16
import uuid import pytest from questionary import Separator from tests.utils import KeyInputs from tests.utils import feed_cli_with_input def test_legacy_name(): message = "Foo message" kwargs = {"choices": ["foo", "bar", "bazz"]} text = "1" + KeyInputs.ENTER + "\r" result, cli = feed_cli_with_input...
"foo"
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_rawselect.py
test_select_second_choice
assert
string_literal
16
import uuid import pytest from questionary import Separator from tests.utils import KeyInputs from tests.utils import feed_cli_with_input def test_select_second_choice(): message = "Foo message" kwargs = {"choices": ["foo", "bar", "bazz"]} text = "2" + KeyInputs.ENTER + "\r" result, cli = feed_cli_w...
"bar"
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_rawselect.py
test_select_third_choice
assert
string_literal
16
import uuid import pytest from questionary import Separator from tests.utils import KeyInputs from tests.utils import feed_cli_with_input def test_select_third_choice(): message = "Foo message" kwargs = {"choices": ["foo", "bar", "bazz"]} text = "2" + "3" + KeyInputs.ENTER + "\r" result, cli = feed_...
"bazz"
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_rawselect.py
test_duplicated_shortcuts
pytest.raises
variable
23
import uuid import pytest from questionary import Separator from tests.utils import KeyInputs from tests.utils import feed_cli_with_input def test_duplicated_shortcuts(): message = "Foo message" kwargs = { "choices": [ {"name": "foo", "key": 1}, Separator(), {"name...
ValueError)
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_rawselect.py
test_select_ctr_c
pytest.raises
variable
15
import uuid import pytest from questionary import Separator from tests.utils import KeyInputs from tests.utils import feed_cli_with_input def test_select_ctr_c(): message = "Foo message" kwargs = {"choices": ["foo", "bazz"]} text = KeyInputs.CONTROLC with pytest.raises(
KeyboardInterrupt)
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_select.py
test_legacy_name
assert
string_literal
16
import pytest from questionary import Choice from questionary import Separator from tests.utils import KeyInputs from tests.utils import feed_cli_with_input from tests.utils import patched_prompt def test_legacy_name(): message = "Foo message" kwargs = {"choices": ["foo", "bar", "bazz"]} text = KeyInputs....
"foo"
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_select.py
test_select_second_choice
assert
string_literal
16
import pytest from questionary import Choice from questionary import Separator from tests.utils import KeyInputs from tests.utils import feed_cli_with_input from tests.utils import patched_prompt def test_select_second_choice(): message = "Foo message" kwargs = {"choices": ["foo", "bar", "bazz"]} text = K...
"bar"
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_select.py
test_select_third_choice
assert
string_literal
16
import pytest from questionary import Choice from questionary import Separator from tests.utils import KeyInputs from tests.utils import feed_cli_with_input from tests.utils import patched_prompt def test_select_third_choice(): message = "Foo message" kwargs = {"choices": ["foo", "bar", "bazz"]} text = Ke...
"bazz"
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_text.py
test_legacy_name
assert
string_literal
14
import re from prompt_toolkit.validation import ValidationError from prompt_toolkit.validation import Validator from tests.utils import feed_cli_with_input def test_legacy_name(): message = "What is your name" text = "bob\r" result, cli = feed_cli_with_input("input", message, text) assert result ==...
"bob"
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_text.py
test_text_validate
assert
string_literal
19
import re from prompt_toolkit.validation import ValidationError from prompt_toolkit.validation import Validator from tests.utils import feed_cli_with_input def test_text_validate(): message = "What is your name" text = "Doe\r" result, cli = feed_cli_with_input( "text", message, t...
"Doe"
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/prompts/test_text.py
test_text_validate_with_class
assert
string_literal
22
import re from prompt_toolkit.validation import ValidationError from prompt_toolkit.validation import Validator from tests.utils import feed_cli_with_input def test_text_validate_with_class(): class SimpleValidator(Validator): def validate(self, document): ok = re.match("[01][01][01]", docume...
"001"
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_examples.py
test_confirm_example
assert
variable
25
from prompt_toolkit.input.defaults import create_pipe_input from prompt_toolkit.output import DummyOutput from tests.utils import KeyInputs def ask_with_patched_input(q, text): inp = create_pipe_input() try: inp.send_text(text) return q(input=inp, output=DummyOutput()) finally: inp...
result_py
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_examples.py
test_confirm_example
assert
collection
24
from prompt_toolkit.input.defaults import create_pipe_input from prompt_toolkit.output import DummyOutput from tests.utils import KeyInputs def ask_with_patched_input(q, text): inp = create_pipe_input() try: inp.send_text(text) return q(input=inp, output=DummyOutput()) finally: inp...
{"continue": False}
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_examples.py
test_autocomplete_example
assert
string_literal
25
from prompt_toolkit.input.defaults import create_pipe_input from prompt_toolkit.output import DummyOutput from tests.utils import KeyInputs def ask_with_patched_input(q, text): inp = create_pipe_input() try: inp.send_text(text) return q(input=inp, output=DummyOutput()) finally: inp...
"Polyergus lucidus"
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_examples.py
test_password_example
assert
collection
24
from prompt_toolkit.input.defaults import create_pipe_input from prompt_toolkit.output import DummyOutput from tests.utils import KeyInputs def ask_with_patched_input(q, text): inp = create_pipe_input() try: inp.send_text(text) return q(input=inp, output=DummyOutput()) finally: inp...
{"password": "asdf"}
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_examples.py
test_checkbox_example
assert
collection
24
from prompt_toolkit.input.defaults import create_pipe_input from prompt_toolkit.output import DummyOutput from tests.utils import KeyInputs def ask_with_patched_input(q, text): inp = create_pipe_input() try: inp.send_text(text) return q(input=inp, output=DummyOutput()) finally: inp...
{"toppings": ["foo"]}
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_examples.py
test_text_example
assert
collection
24
from prompt_toolkit.input.defaults import create_pipe_input from prompt_toolkit.output import DummyOutput from tests.utils import KeyInputs def ask_with_patched_input(q, text): inp = create_pipe_input() try: inp.send_text(text) return q(input=inp, output=DummyOutput()) finally: inp...
{"phone": "1234567890"}
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_examples.py
test_autocomplete_example
assert
collection
24
from prompt_toolkit.input.defaults import create_pipe_input from prompt_toolkit.output import DummyOutput from tests.utils import KeyInputs def ask_with_patched_input(q, text): inp = create_pipe_input() try: inp.send_text(text) return q(input=inp, output=DummyOutput()) finally: inp...
{"ants": "Polyergus lucidus"}
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_examples.py
test_rawselect_example
assert
collection
24
from prompt_toolkit.input.defaults import create_pipe_input from prompt_toolkit.output import DummyOutput from tests.utils import KeyInputs def ask_with_patched_input(q, text): inp = create_pipe_input() try: inp.send_text(text) return q(input=inp, output=DummyOutput()) finally: inp...
{"theme": "Ask opening hours"}
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_examples.py
test_select_example
assert
collection
24
from prompt_toolkit.input.defaults import create_pipe_input from prompt_toolkit.output import DummyOutput from tests.utils import KeyInputs def ask_with_patched_input(q, text): inp = create_pipe_input() try: inp.send_text(text) return q(input=inp, output=DummyOutput()) finally: inp...
{"theme": "Make a reservation"}
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_form.py
test_ask_should_catch_keyboard_exception
assert
collection
34
from prompt_toolkit.input.defaults import create_pipe_input from prompt_toolkit.output import DummyOutput from pytest import fail import questionary from questionary import form from tests.utils import KeyInputs def example_form(inp): return form( q1=questionary.confirm("Hello?", input=inp, output=DummyOu...
{}
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_form.py
test_form_skips_questions
assert
collection
36
from prompt_toolkit.input.defaults import create_pipe_input from prompt_toolkit.output import DummyOutput from pytest import fail import questionary from questionary import form from tests.utils import KeyInputs def example_form(inp): return form( q1=questionary.confirm("Hello?", input=inp, output=DummyOu...
{"q1": True, "q2": 42}
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_form.py
test_form_creation
assert
collection
36
from prompt_toolkit.input.defaults import create_pipe_input from prompt_toolkit.output import DummyOutput from pytest import fail import questionary from questionary import form from tests.utils import KeyInputs def example_form(inp): return form( q1=questionary.confirm("Hello?", input=inp, output=DummyOu...
{"q1": True, "q2": "foo"}
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_prompt.py
test_invalid_question_type
pytest.raises
variable
8
import pytest from questionary.prompt import PromptParameterException from questionary.prompt import prompt def test_invalid_question_type(): with pytest.raises(
ValueError)
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_prompt.py
test_missing_message
pytest.raises
variable
8
import pytest from questionary.prompt import PromptParameterException from questionary.prompt import prompt def test_missing_message(): with pytest.raises(
PromptParameterException)
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_question.py
test_skipping_of_questions
assert
numeric_literal
21
import asyncio import platform import pytest from prompt_toolkit.input.defaults import create_pipe_input from prompt_toolkit.output import DummyOutput from pytest import fail from questionary import text from questionary.utils import is_prompt_toolkit_3 from tests.utils import KeyInputs def test_skipping_of_question...
42
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_question.py
test_ask_should_catch_keyboard_exception
assert
none_literal
22
import asyncio import platform import pytest from prompt_toolkit.input.defaults import create_pipe_input from prompt_toolkit.output import DummyOutput from pytest import fail from questionary import text from questionary.utils import is_prompt_toolkit_3 from tests.utils import KeyInputs def test_ask_should_catch_key...
None
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_question.py
test_async_ask_question
assert
string_literal
26
import asyncio import platform import pytest from prompt_toolkit.input.defaults import create_pipe_input from prompt_toolkit.output import DummyOutput from pytest import fail from questionary import text from questionary.utils import is_prompt_toolkit_3 from tests.utils import KeyInputs @pytest.mark.skipif( not ...
"World"
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_question.py
test_multiline_text
assert
string_literal
20
import asyncio import platform import pytest from prompt_toolkit.input.defaults import create_pipe_input from prompt_toolkit.output import DummyOutput from pytest import fail from questionary import text from questionary.utils import is_prompt_toolkit_3 from tests.utils import KeyInputs def test_multiline_text(): ...
"Hello\nworld"
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_utils.py
test_default_values_of_no_args
assert
collection
9
from questionary import utils def test_default_values_of_no_args(): def f(): pass defaults = utils.default_values_of(f) assert defaults ==
[]
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_utils.py
test_filter_kwargs_empty
assert
collection
14
from questionary import utils def test_filter_kwargs_empty(): def f(): pass kwargs = { "a": 1, "b": 2, } filtered = utils.used_kwargs(kwargs, f) assert filtered ==
{}
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_utils.py
test_required_arguments_of
assert
collection
9
from questionary import utils def test_required_arguments_of(): def f(a, b=2, c=None, *args, **kwargs): pass defaults = utils.required_arguments(f) assert defaults ==
["a"]
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_utils.py
test_missing_arguments
assert
collection
8
from questionary import utils def test_missing_arguments(): def f(a, b=2, c=None, *args, **kwargs): pass assert utils.missing_arguments(f, {}) ==
{"a"}
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_utils.py
test_missing_arguments
assert
func_call
9
from questionary import utils def test_missing_arguments(): def f(a, b=2, c=None, *args, **kwargs): pass assert utils.missing_arguments(f, {}) == {"a"} assert utils.missing_arguments(f, {"a": 1}) ==
set()
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_utils.py
test_filter_kwargs
assert
variable
16
from questionary import utils def test_filter_kwargs(): def f(a, b=1, *, c=2): pass kwargs = { "a": 1, "b": 2, "c": 3, "d": 4, } filtered = utils.used_kwargs(kwargs, f) assert "a" in
filtered
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_utils.py
test_default_values_of
assert
collection
9
from questionary import utils def test_default_values_of(): def f(a, b=2, c=None, *args, **kwargs): pass defaults = utils.default_values_of(f) assert defaults ==
["b", "c", "args", "kwargs"]
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmbo/questionary
39638091b83f66704207e8da1b064201a1861d84
47
train
train
tests/test_utils.py
test_arguments_of
assert
collection
9
from questionary import utils def test_arguments_of(): def f(a, b=2, c=None, *args, **kwargs): pass defaults = utils.arguments_of(f) assert defaults ==
["a", "b", "c", "args", "kwargs"]
39638091b83f66704207e8da1b064201a1861d84
47
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/conftest.py
session
assert
string_literal
83
import logging import os import pytest from libtmux import exc from libtmux.server import Server from libtmux.test import TEST_SESSION_PREFIX, get_test_session_name, namer logger = logging.getLogger(__name__) def monkeypatch_plugin_test_packages(monkeypatch): paths = [ "tests/fixtures/pluginsystem/plugi...
"tmuxp"
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/conftest.py
session
assert
func_call
82
import logging import os import pytest from libtmux import exc from libtmux.server import Server from libtmux.test import TEST_SESSION_PREFIX, get_test_session_name, namer logger = logging.getLogger(__name__) def monkeypatch_plugin_test_packages(monkeypatch): paths = [ "tests/fixtures/pluginsystem/plugi...
session.get("session_name")
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_cli.py
test_in_dir_from_config_dir
assert
numeric_literal
43
import json import os import pathlib from unittest.mock import MagicMock import pytest import click import kaptan from click.testing import CliRunner import libtmux from libtmux.common import has_lt_version from libtmux.exc import LibTmuxException from tmuxp import cli, config, exc from tmuxp.cli import ( _load_...
2
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_cli.py
test_ignore_non_configs_from_current_dir
assert
numeric_literal
43
import json import os import pathlib from unittest.mock import MagicMock import pytest import click import kaptan from click.testing import CliRunner import libtmux from libtmux.common import has_lt_version from libtmux.exc import LibTmuxException from tmuxp import cli, config, exc from tmuxp.cli import ( _load_...
1
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_cli.py
test_load_attached_detached
assert
numeric_literal
65
import json import os import pathlib from unittest.mock import MagicMock import pytest import click import kaptan from click.testing import CliRunner import libtmux from libtmux.common import has_lt_version from libtmux.exc import LibTmuxException from tmuxp import cli, config, exc from tmuxp.cli import ( _load_...
0
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_cli.py
test_load_append_windows_to_current_session
assert
numeric_literal
57
import json import os import pathlib from unittest.mock import MagicMock import pytest import click import kaptan from click.testing import CliRunner import libtmux from libtmux.common import has_lt_version from libtmux.exc import LibTmuxException from tmuxp import cli, config, exc from tmuxp.cli import ( _load_...
3
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_cli.py
test_load_append_windows_to_current_session
assert
numeric_literal
66
import json import os import pathlib from unittest.mock import MagicMock import pytest import click import kaptan from click.testing import CliRunner import libtmux from libtmux.common import has_lt_version from libtmux.exc import LibTmuxException from tmuxp import cli, config, exc from tmuxp.cli import ( _load_...
6
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_cli.py
test_is_pure_name
assert
variable
50
import json import os import pathlib from unittest.mock import MagicMock import pytest import click import kaptan from click.testing import CliRunner import libtmux from libtmux.common import has_lt_version from libtmux.exc import LibTmuxException from tmuxp import cli, config, exc from tmuxp.cli import ( _load_...
expect
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_cli.py
test_debug_info_cli
assert
variable
53
import json import os import pathlib from unittest.mock import MagicMock import pytest import click import kaptan from click.testing import CliRunner import libtmux from libtmux.common import has_lt_version from libtmux.exc import LibTmuxException from tmuxp import cli, config, exc from tmuxp.cli import ( _load_...
cli_output
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config.py
test_scan_config
assert
variable
44
import os import pytest import kaptan from tmuxp import config, exc from . import example_dir from .fixtures import config as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") def load_yaml(yaml): return kaptan.Kaptan(handler="yaml").import_config(yaml).get() def load_config(_file): ...
files
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config.py
test_scan_config
assert
variable
34
import os import pytest import kaptan from tmuxp import config, exc from . import example_dir from .fixtures import config as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") def load_yaml(yaml): return kaptan.Kaptan(handler="yaml").import_config(yaml).get() def load_config(_file): ...
configs
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config.py
test_in_session_scope
assert
variable
26
import os import pytest import kaptan from tmuxp import config, exc from . import example_dir from .fixtures import config as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") def load_yaml(yaml): return kaptan.Kaptan(handler="yaml").import_config(yaml).get() def load_config(_file): ...
sconfig
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config.py
test_config_expand2
assert
variable
28
import os import pytest import kaptan from tmuxp import config, exc from . import example_dir from .fixtures import config as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") def load_yaml(yaml): return kaptan.Kaptan(handler="yaml").import_config(yaml).get() def load_config(_file): ...
expanded_dict
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config.py
test_inline_config
assert
variable
25
import os import pytest import kaptan from tmuxp import config, exc from . import example_dir from .fixtures import config as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") def load_yaml(yaml): return kaptan.Kaptan(handler="yaml").import_config(yaml).get() def load_config(_file): ...
iafter_config
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config.py
test_export_json
assert
variable
33
import os import pytest import kaptan from tmuxp import config, exc from . import example_dir from .fixtures import config as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") def load_yaml(yaml): return kaptan.Kaptan(handler="yaml").import_config(yaml).get() def load_config(_file): ...
new_config_data
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config.py
test_no_session_name
pytest.raises
complex_expr
38
import os import pytest import kaptan from tmuxp import config, exc from . import example_dir from .fixtures import config as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") def load_yaml(yaml): return kaptan.Kaptan(handler="yaml").import_config(yaml).get() def load_config(_file): ...
exc.ConfigError)
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config.py
test_replaces_env_variables
assert
complex_expr
55
import os import pytest import kaptan from tmuxp import config, exc from . import example_dir from .fixtures import config as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") def load_yaml(yaml): return kaptan.Kaptan(handler="yaml").import_config(yaml).get() def load_config(_file): ...
sconfig["session_name"]
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config.py
test_inheritance_config
assert
variable
46
import os import pytest import kaptan from tmuxp import config, exc from . import example_dir from .fixtures import config as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") def load_yaml(yaml): return kaptan.Kaptan(handler="yaml").import_config(yaml).get() def load_config(_file): ...
inheritance_config_after
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config.py
test_replaces_env_variables
assert
complex_expr
54
import os import pytest import kaptan from tmuxp import config, exc from . import example_dir from .fixtures import config as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") def load_yaml(yaml): return kaptan.Kaptan(handler="yaml").import_config(yaml).get() def load_config(_file): ...
sconfig["before_script"]
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config.py
test_trickle_relative_start_directory
assert
complex_expr
23
import os import pytest import kaptan from tmuxp import config, exc from . import example_dir from .fixtures import config as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") def load_yaml(yaml): return kaptan.Kaptan(handler="yaml").import_config(yaml).get() def load_config(_file): ...
fixtures.trickle.expected
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config.py
test_replaces_env_variables
assert
complex_expr
52
import os import pytest import kaptan from tmuxp import config, exc from . import example_dir from .fixtures import config as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") def load_yaml(yaml): return kaptan.Kaptan(handler="yaml").import_config(yaml).get() def load_config(_file): ...
sconfig["start_directory"]
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config.py
test_config_expand1
assert
complex_expr
24
import os import pytest import kaptan from tmuxp import config, exc from . import example_dir from .fixtures import config as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") def load_yaml(yaml): return kaptan.Kaptan(handler="yaml").import_config(yaml).get() def load_config(_file): ...
fixtures.expand1.after_config
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config.py
test_expands_blank_panes
assert
complex_expr
51
import os import pytest import kaptan from tmuxp import config, exc from . import example_dir from .fixtures import config as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") def load_yaml(yaml): return kaptan.Kaptan(handler="yaml").import_config(yaml).get() def load_config(_file): ...
fixtures.expand_blank.expected
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config_teamocil.py
test_multisession_config
assert
variable
44
import os import pytest import kaptan from tmuxp import config from .fixtures import config_teamocil as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") def multisession_config(): """Return loaded multisession teamocil config as a dictionary. Also prevents re-running assertion the l...
expected
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config_teamocil.py
test_config_to_dict
assert
variable
45
import os import pytest import kaptan from tmuxp import config from .fixtures import config_teamocil as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") @pytest.mark.parametrize( "teamocil_yaml,teamocil_dict,tmuxp_dict", [ ( fixtures.test1.teamocil_yaml, ...
tmuxp_dict
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config_teamocil.py
test_config_to_dict
assert
variable
43
import os import pytest import kaptan from tmuxp import config from .fixtures import config_teamocil as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") @pytest.mark.parametrize( "teamocil_yaml,teamocil_dict,tmuxp_dict", [ ( fixtures.test1.teamocil_yaml, ...
teamocil_dict
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config_tmuxinator.py
test_config_to_dict
assert
variable
40
import os import pytest import kaptan from tmuxp import config from .fixtures import config_tmuxinator as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") @pytest.mark.parametrize( "tmuxinator_yaml,tmuxinator_dict,tmuxp_dict", [ ( fixtures.test1.tmuxinator_yaml, ...
tmuxp_dict
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_config_tmuxinator.py
test_config_to_dict
assert
variable
38
import os import pytest import kaptan from tmuxp import config from .fixtures import config_tmuxinator as fixtures TMUXP_DIR = os.path.join(os.path.dirname(__file__), ".tmuxp") @pytest.mark.parametrize( "tmuxinator_yaml,tmuxinator_dict,tmuxp_dict", [ ( fixtures.test1.tmuxinator_yaml, ...
tmuxinator_dict
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_plugin.py
test_tmux_version_fail_min
assert
func_call
29
import pytest from tmuxp.exc import TmuxpPluginException from .fixtures.pluginsystem.partials.all_pass import AllVersionPassPlugin from .fixtures.pluginsystem.partials.libtmux_version_fail import ( LibtmuxVersionFailIncompatiblePlugin, LibtmuxVersionFailMaxPlugin, LibtmuxVersionFailMinPlugin, ) from .fixt...
str(exc_info.value)
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_plugin.py
test_tmux_version_fail_min
pytest.raises
complex_expr
27
import pytest from tmuxp.exc import TmuxpPluginException from .fixtures.pluginsystem.partials.all_pass import AllVersionPassPlugin from .fixtures.pluginsystem.partials.libtmux_version_fail import ( LibtmuxVersionFailIncompatiblePlugin, LibtmuxVersionFailMaxPlugin, LibtmuxVersionFailMinPlugin, ) from .fixt...
TmuxpPluginException, match=r"Incompatible.*")
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_util.py
test_return_stdout_if_ok
assert
variable
17
import os import pytest from tmuxp import exc from tmuxp.exc import BeforeLoadScriptError, BeforeLoadScriptNotExists from tmuxp.util import get_session, run_before_script from . import fixtures_dir def test_return_stdout_if_ok(capsys): script_file = os.path.join(fixtures_dir, "script_complete.sh") run_befo...
out
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_util.py
test_raise_BeforeLoadScriptNotExists_if_not_exists
pytest.raises
variable
18
import os import pytest from tmuxp import exc from tmuxp.exc import BeforeLoadScriptError, BeforeLoadScriptNotExists from tmuxp.util import get_session, run_before_script from . import fixtures_dir def test_raise_BeforeLoadScriptNotExists_if_not_exists(): script_file = os.path.join(fixtures_dir, "script_noexist...
OSError)
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_util.py
test_get_session_should_return_first_session_if_no_active_session
assert
variable
16
import os import pytest from tmuxp import exc from tmuxp.exc import BeforeLoadScriptError, BeforeLoadScriptNotExists from tmuxp.util import get_session, run_before_script from . import fixtures_dir def test_get_session_should_return_first_session_if_no_active_session(server): first_session = server.new_session(...
first_session
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_util.py
test_get_session_should_default_to_local_attached_session
assert
variable
22
import os import pytest from tmuxp import exc from tmuxp.exc import BeforeLoadScriptError, BeforeLoadScriptNotExists from tmuxp.util import get_session, run_before_script from . import fixtures_dir def test_get_session_should_default_to_local_attached_session(server, monkeypatch): server.new_session(session_nam...
second_session
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_util.py
test_raise_BeforeLoadScriptError_if_retcode
pytest.raises
variable
15
import os import pytest from tmuxp import exc from tmuxp.exc import BeforeLoadScriptError, BeforeLoadScriptNotExists from tmuxp.util import get_session, run_before_script from . import fixtures_dir def test_raise_BeforeLoadScriptError_if_retcode(): script_file = os.path.join(fixtures_dir, "script_failed.sh") ...
BeforeLoadScriptError)
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_util.py
test_raise_BeforeLoadScriptNotExists_if_not_exists
pytest.raises
variable
15
import os import pytest from tmuxp import exc from tmuxp.exc import BeforeLoadScriptError, BeforeLoadScriptNotExists from tmuxp.util import get_session, run_before_script from . import fixtures_dir def test_raise_BeforeLoadScriptNotExists_if_not_exists(): script_file = os.path.join(fixtures_dir, "script_noexist...
BeforeLoadScriptNotExists)
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_util.py
test_beforeload_returncode
pytest.raises
complex_expr
15
import os import pytest from tmuxp import exc from tmuxp.exc import BeforeLoadScriptError, BeforeLoadScriptNotExists from tmuxp.util import get_session, run_before_script from . import fixtures_dir def test_beforeload_returncode(): script_file = os.path.join(fixtures_dir, "script_failed.sh") with pytest.r...
exc.BeforeLoadScriptError)
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_workspacebuilder.py
test_window_options
assert
numeric_literal
42
import os import pathlib import textwrap import time import pytest import kaptan import libtmux from libtmux import Window from libtmux.common import has_gte_version from libtmux.test import retry, temp_session from tmuxp import config, exc from tmuxp.cli import load_plugins from tmuxp.workspacebuilder import Worksp...
5
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_workspacebuilder.py
test_blank_pane_count
assert
numeric_literal
33
import os import pathlib import textwrap import time import pytest import kaptan import libtmux from libtmux import Window from libtmux.common import has_gte_version from libtmux.test import retry, temp_session from tmuxp import config, exc from tmuxp.cli import load_plugins from tmuxp.workspacebuilder import Worksp...
3
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_workspacebuilder.py
test_blank_pane_count
assert
numeric_literal
42
import os import pathlib import textwrap import time import pytest import kaptan import libtmux from libtmux import Window from libtmux.common import has_gte_version from libtmux.test import retry, temp_session from tmuxp import config, exc from tmuxp.cli import load_plugins from tmuxp.workspacebuilder import Worksp...
2
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_workspacebuilder.py
test_plugin_system_before_workspace_builder
assert
numeric_literal
32
import os import pathlib import textwrap import time import pytest import kaptan import libtmux from libtmux import Window from libtmux.common import has_gte_version from libtmux.test import retry, temp_session from tmuxp import config, exc from tmuxp.cli import load_plugins from tmuxp.workspacebuilder import Worksp...
0
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_workspacebuilder.py
test_load_configs_same_session
assert
numeric_literal
30
import os import pathlib import textwrap import time import pytest import kaptan import libtmux from libtmux import Window from libtmux.common import has_gte_version from libtmux.test import retry, temp_session from tmuxp import config, exc from tmuxp.cli import load_plugins from tmuxp.workspacebuilder import Worksp...
1
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tmux-python/tmuxp
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
train
train
tests/test_workspacefreezer.py
test_freeze_config
assert
complex_expr
18
import time import kaptan from tmuxp import config from tmuxp.workspacebuilder import WorkspaceBuilder, freeze from .fixtures._util import load_fixture def test_freeze_config(session): yaml_config = load_fixture("workspacefreezer/sampleconfig.yaml") sconfig = kaptan.Kaptan(handler="yaml") sconfig = scon...
builder.session
2c6f4c331b491ef2609fb91b20503aa46768f0d2
338
v2_extractor_at_anchor
tomerfiliba/plumbum
fd4f6c563d781f549b2f150146b32792753b6399
194
train
train
experiments/test_parallel.py
test_parallel
assert
numeric_literal
29
import unittest from parallel import Cluster from plumbum import SshMachine, local TEST_HOST = "127.0.0.1" class TestParallel(unittest.TestCase): def setUp(self): self.remotes = [] def connect(self): m = SshMachine(TEST_HOST) self.remotes.append(m) return m def tearDown...
2
fd4f6c563d781f549b2f150146b32792753b6399
194
v2_extractor_at_anchor
tomerfiliba/plumbum
fd4f6c563d781f549b2f150146b32792753b6399
194
train
train
experiments/test_parallel.py
test_locals
assert
numeric_literal
28
import unittest from parallel import Cluster from plumbum import SshMachine, local TEST_HOST = "127.0.0.1" class TestParallel(unittest.TestCase): def setUp(self): self.remotes = [] def connect(self): m = SshMachine(TEST_HOST) self.remotes.append(m) return m def tearDown...
3
fd4f6c563d781f549b2f150146b32792753b6399
194
v2_extractor_at_anchor
tomerfiliba/plumbum
fd4f6c563d781f549b2f150146b32792753b6399
194
train
train
experiments/test_parallel.py
test_sessions
assert
numeric_literal
28
import unittest from parallel import Cluster from plumbum import SshMachine, local TEST_HOST = "127.0.0.1" class TestParallel(unittest.TestCase): def setUp(self): self.remotes = [] def connect(self): m = SshMachine(TEST_HOST) self.remotes.append(m) return m def tearDown...
4
fd4f6c563d781f549b2f150146b32792753b6399
194
v2_extractor_at_anchor
tomerfiliba/plumbum
fd4f6c563d781f549b2f150146b32792753b6399
194
train
train
experiments/test_parallel.py
test_commands
assert
collection
27
import unittest from parallel import Cluster from plumbum import SshMachine, local TEST_HOST = "127.0.0.1" class TestParallel(unittest.TestCase): def setUp(self): self.remotes = [] def connect(self): m = SshMachine(TEST_HOST) self.remotes.append(m) return m def tearDown...
(1, 2)
fd4f6c563d781f549b2f150146b32792753b6399
194
v2_extractor_at_anchor
tomerfiliba/plumbum
fd4f6c563d781f549b2f150146b32792753b6399
194
train
train
experiments/test_parallel.py
test_parallel
assert
func_call
30
import unittest from parallel import Cluster from plumbum import SshMachine, local TEST_HOST = "127.0.0.1" class TestParallel(unittest.TestCase): def setUp(self): self.remotes = [] def connect(self): m = SshMachine(TEST_HOST) self.remotes.append(m) return m def tearDown...
time.time() - t
fd4f6c563d781f549b2f150146b32792753b6399
194
v2_extractor_at_anchor
tomerfiliba/plumbum
fd4f6c563d781f549b2f150146b32792753b6399
194
train
train
tests/test_3_cli.py
test_prog
assert
numeric_literal
7
from plumbum import cli class TestProg3: def test_prog(self, capsys): _, rc = Main3Validator.run(["prog", "1", "2", "3", "4", "5"], exit=False) assert rc ==
0
fd4f6c563d781f549b2f150146b32792753b6399
194
v2_extractor_at_anchor
tomerfiliba/plumbum
fd4f6c563d781f549b2f150146b32792753b6399
194
train
train
tests/test_3_cli.py
test_prog
assert
func_call
8
from plumbum import cli class TestProg3: def test_prog(self, capsys): _, rc = Main3Validator.run(["prog", "1", "2", "3", "4", "5"], exit=False) assert rc == 0 assert "1 2 (3, 4, 5)" in
capsys.readouterr()[0]
fd4f6c563d781f549b2f150146b32792753b6399
194
v2_extractor_at_anchor
tomerfiliba/plumbum
fd4f6c563d781f549b2f150146b32792753b6399
194
train
train
tests/test_cli.py
test_help
assert
numeric_literal
12
import sys import pytest from plumbum import cli, local from plumbum.cli.terminal import get_terminal_size class TestInheritedApp: def test_help(self, capsys): _, rc = AppB.run(["AppB", "-h"], exit=False) assert rc ==
0
fd4f6c563d781f549b2f150146b32792753b6399
194
v2_extractor_at_anchor
tomerfiliba/plumbum
fd4f6c563d781f549b2f150146b32792753b6399
194
train
train
tests/test_cli.py
test_failures
assert
numeric_literal
13
import sys import pytest from plumbum import cli, local from plumbum.cli.terminal import get_terminal_size class TestCLI: def test_failures(self): _, rc = SimpleApp.run(["foo"], exit=False) assert rc ==
2
fd4f6c563d781f549b2f150146b32792753b6399
194
v2_extractor_at_anchor