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
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_symbols.py
helper_check_symbols_all_scope
assert
numeric_literal
33
import os import sys import pytest from pylsp import uris from pylsp.plugins.symbols import pylsp_document_symbols from pylsp.lsp import SymbolKind from pylsp.workspace import Document PY2 = sys.version[0] == '2' LINUX = sys.platform.startswith('linux') CI = os.environ.get('CI') DOC_URI = uris.from_fs_path(__file__)...
8
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_symbols.py
test_symbols
assert
numeric_literal
54
import os import sys import pytest from pylsp import uris from pylsp.plugins.symbols import pylsp_document_symbols from pylsp.lsp import SymbolKind from pylsp.workspace import Document PY2 = sys.version[0] == '2' LINUX = sys.platform.startswith('linux') CI = os.environ.get('CI') DOC_URI = uris.from_fs_path(__file__)...
5
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_symbols.py
helper_check_symbols_all_scope
assert
complex_expr
40
import os import sys import pytest from pylsp import uris from pylsp.plugins.symbols import pylsp_document_symbols from pylsp.lsp import SymbolKind from pylsp.workspace import Document PY2 = sys.version[0] == '2' LINUX = sys.platform.startswith('linux') CI = os.environ.get('CI') DOC_URI = uris.from_fs_path(__file__)...
SymbolKind.Class
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_symbols.py
helper_check_symbols_all_scope
assert
complex_expr
41
import os import sys import pytest from pylsp import uris from pylsp.plugins.symbols import pylsp_document_symbols from pylsp.lsp import SymbolKind from pylsp.workspace import Document PY2 = sys.version[0] == '2' LINUX = sys.platform.startswith('linux') CI = os.environ.get('CI') DOC_URI = uris.from_fs_path(__file__)...
SymbolKind.Method
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_symbols.py
helper_check_symbols_all_scope
assert
complex_expr
39
import os import sys import pytest from pylsp import uris from pylsp.plugins.symbols import pylsp_document_symbols from pylsp.lsp import SymbolKind from pylsp.workspace import Document PY2 = sys.version[0] == '2' LINUX = sys.platform.startswith('linux') CI = os.environ.get('CI') DOC_URI = uris.from_fs_path(__file__)...
SymbolKind.Variable
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_symbols.py
helper_check_symbols_all_scope
assert
complex_expr
42
import os import sys import pytest from pylsp import uris from pylsp.plugins.symbols import pylsp_document_symbols from pylsp.lsp import SymbolKind from pylsp.workspace import Document PY2 = sys.version[0] == '2' LINUX = sys.platform.startswith('linux') CI = os.environ.get('CI') DOC_URI = uris.from_fs_path(__file__)...
SymbolKind.Function
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_symbols.py
test_symbols
assert
collection
65
import os import sys import pytest from pylsp import uris from pylsp.plugins.symbols import pylsp_document_symbols from pylsp.lsp import SymbolKind from pylsp.workspace import Document PY2 = sys.version[0] == '2' LINUX = sys.platform.startswith('linux') CI = os.environ.get('CI') DOC_URI = uris.from_fs_path(__file__)...
{'line': 2, 'character': 0}
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_yapf_format.py
test_format_returns_text_edit_per_line
assert
numeric_literal
35
import pytest from pylsp import uris from pylsp.plugins.yapf_format import pylsp_format_document, pylsp_format_range from pylsp.workspace import Document from pylsp.text_edit import apply_text_edits DOC_URI = uris.from_fs_path(__file__) DOC = """A = [ 'h', 'w', 'a' ] B = ['h', 'w'] """ GOOD_DOC =...
4
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_yapf_format.py
test_format_returns_text_edit_per_line
assert
string_literal
36
import pytest from pylsp import uris from pylsp.plugins.yapf_format import pylsp_format_document, pylsp_format_range from pylsp.workspace import Document from pylsp.text_edit import apply_text_edits DOC_URI = uris.from_fs_path(__file__) DOC = """A = [ 'h', 'w', 'a' ] B = ['h', 'w'] """ GOOD_DOC =...
""
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_yapf_format.py
test_format_returns_text_edit_per_line
assert
string_literal
38
import pytest from pylsp import uris from pylsp.plugins.yapf_format import pylsp_format_document, pylsp_format_range from pylsp.workspace import Document from pylsp.text_edit import apply_text_edits DOC_URI = uris.from_fs_path(__file__) DOC = """A = [ 'h', 'w', 'a' ] B = ['h', 'w'] """ GOOD_DOC =...
" log(\"x\")\n"
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_yapf_format.py
test_format_returns_text_edit_per_line
assert
string_literal
39
import pytest from pylsp import uris from pylsp.plugins.yapf_format import pylsp_format_document, pylsp_format_range from pylsp.workspace import Document from pylsp.text_edit import apply_text_edits DOC_URI = uris.from_fs_path(__file__) DOC = """A = [ 'h', 'w', 'a' ] B = ['h', 'w'] """ GOOD_DOC =...
" log(\"hi\")\n"
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_yapf_format.py
test_format_with_insert_spaces_option
assert
func_call
31
import pytest from pylsp import uris from pylsp.plugins.yapf_format import pylsp_format_document, pylsp_format_range from pylsp.workspace import Document from pylsp.text_edit import apply_text_edits DOC_URI = uris.from_fs_path(__file__) DOC = """A = [ 'h', 'w', 'a' ] B = ['h', 'w'] """ GOOD_DOC =...
FOUR_SPACE_DOC.replace(" ", "\t")
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_yapf_format.py
test_format
assert
string_literal
31
import pytest from pylsp import uris from pylsp.plugins.yapf_format import pylsp_format_document, pylsp_format_range from pylsp.workspace import Document from pylsp.text_edit import apply_text_edits DOC_URI = uris.from_fs_path(__file__) DOC = """A = [ 'h', 'w', 'a' ] B = ['h', 'w'] """ GOOD_DOC =...
"A = ['h', 'w', 'a']\n\nB = ['h', 'w']\n"
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_yapf_format.py
test_format_with_tab_size_option
assert
func_call
31
import pytest from pylsp import uris from pylsp.plugins.yapf_format import pylsp_format_document, pylsp_format_range from pylsp.workspace import Document from pylsp.text_edit import apply_text_edits DOC_URI = uris.from_fs_path(__file__) DOC = """A = [ 'h', 'w', 'a' ] B = ['h', 'w'] """ GOOD_DOC =...
FOUR_SPACE_DOC.replace(" ", " ")
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_yapf_format.py
test_range_format
assert
string_literal
37
import pytest from pylsp import uris from pylsp.plugins.yapf_format import pylsp_format_document, pylsp_format_range from pylsp.workspace import Document from pylsp.text_edit import apply_text_edits DOC_URI = uris.from_fs_path(__file__) DOC = """A = [ 'h', 'w', 'a' ] B = ['h', 'w'] """ GOOD_DOC =...
"A = ['h', 'w', 'a']\n\nB = ['h',\n\n\n'w']\n"
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_yapf_format.py
test_config_file
assert
string_literal
37
import pytest from pylsp import uris from pylsp.plugins.yapf_format import pylsp_format_document, pylsp_format_range from pylsp.workspace import Document from pylsp.text_edit import apply_text_edits DOC_URI = uris.from_fs_path(__file__) DOC = """A = [ 'h', 'w', 'a' ] B = ['h', 'w'] """ GOOD_DOC =...
"A = [\n 'h', 'w',\n 'a'\n]\n\nB = ['h', 'w']\n"
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_yapf_format.py
test_line_endings
assert
string_literal
32
import pytest from pylsp import uris from pylsp.plugins.yapf_format import pylsp_format_document, pylsp_format_range from pylsp.workspace import Document from pylsp.text_edit import apply_text_edits DOC_URI = uris.from_fs_path(__file__) DOC = """A = [ 'h', 'w', 'a' ] B = ['h', 'w'] """ GOOD_DOC =...
f'import os{newline}import sys{2 * newline}dict(a=1){newline}'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_document.py
test_document_lines
assert
numeric_literal
6
from test.fixtures import DOC_URI, DOC from pylsp.workspace import Document def test_document_lines(doc): assert len(doc.lines) ==
4
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_document.py
test_offset_at_position
assert
numeric_literal
6
from test.fixtures import DOC_URI, DOC from pylsp.workspace import Document def test_offset_at_position(doc): assert doc.offset_at_position({'line': 0, 'character': 8}) ==
8
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_document.py
test_offset_at_position
assert
numeric_literal
7
from test.fixtures import DOC_URI, DOC from pylsp.workspace import Document def test_offset_at_position(doc): assert doc.offset_at_position({'line': 0, 'character': 8}) == 8 assert doc.offset_at_position({'line': 1, 'character': 5}) ==
16
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_document.py
test_offset_at_position
assert
numeric_literal
8
from test.fixtures import DOC_URI, DOC from pylsp.workspace import Document def test_offset_at_position(doc): assert doc.offset_at_position({'line': 0, 'character': 8}) == 8 assert doc.offset_at_position({'line': 1, 'character': 5}) == 16 assert doc.offset_at_position({'line': 2, 'character': 0}) ==
12
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_document.py
test_offset_at_position
assert
numeric_literal
10
from test.fixtures import DOC_URI, DOC from pylsp.workspace import Document def test_offset_at_position(doc): assert doc.offset_at_position({'line': 0, 'character': 8}) == 8 assert doc.offset_at_position({'line': 1, 'character': 5}) == 16 assert doc.offset_at_position({'line': 2, 'character': 0}) == 12 ...
51
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_document.py
test_word_at_position
assert
string_literal
12
from test.fixtures import DOC_URI, DOC from pylsp.workspace import Document def test_word_at_position(doc): """ Return the position under the cursor (or last in line if past the end) """ # import sys assert doc.word_at_position({'line': 0, 'character': 8}) == 'sys' # Past end of import sys assert d...
''
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_document.py
test_document_props
assert
variable
7
from test.fixtures import DOC_URI, DOC from pylsp.workspace import Document def test_document_props(doc): assert doc.uri == DOC_URI assert doc.source ==
DOC
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_document.py
test_document_empty_edit
assert
string_literal
14
from test.fixtures import DOC_URI, DOC from pylsp.workspace import Document def test_document_empty_edit(workspace): doc = Document('file:///uri', workspace, '') doc.apply_change({ 'range': { 'start': {'line': 0, 'character': 0}, 'end': {'line': 0, 'character': 0} }, ...
'f'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_document.py
test_word_at_position
assert
string_literal
8
from test.fixtures import DOC_URI, DOC from pylsp.workspace import Document def test_word_at_position(doc): """ Return the position under the cursor (or last in line if past the end) """ # import sys assert doc.word_at_position({'line': 0, 'character': 8}) ==
'sys'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_document.py
test_word_at_position
assert
string_literal
14
from test.fixtures import DOC_URI, DOC from pylsp.workspace import Document def test_word_at_position(doc): """ Return the position under the cursor (or last in line if past the end) """ # import sys assert doc.word_at_position({'line': 0, 'character': 8}) == 'sys' # Past end of import sys assert d...
'def'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_document.py
test_document_props
assert
variable
6
from test.fixtures import DOC_URI, DOC from pylsp.workspace import Document def test_document_props(doc): assert doc.uri ==
DOC_URI
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_document.py
test_document_lines
assert
string_literal
7
from test.fixtures import DOC_URI, DOC from pylsp.workspace import Document def test_document_lines(doc): assert len(doc.lines) == 4 assert doc.lines[0] ==
'import sys\n'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_document.py
test_document_line_edit
assert
string_literal
14
from test.fixtures import DOC_URI, DOC from pylsp.workspace import Document def test_document_line_edit(workspace): doc = Document('file:///uri', workspace, 'itshelloworld') doc.apply_change({ 'text': 'goodbye', 'range': { 'start': {'line': 0, 'character': 3}, 'end': {'l...
'itsgoodbyeworld'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_document.py
test_document_end_of_file_edit
assert
collection
15
from test.fixtures import DOC_URI, DOC from pylsp.workspace import Document def test_document_end_of_file_edit(workspace): old = [ "print 'a'\n", "print 'b'\n" ] doc = Document('file:///uri', workspace, ''.join(old)) doc.apply_change({'text': 'o', 'range': { 'start': {'line': 2,...
[ "print 'a'\n", "print 'b'\n", "o", ]
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_document.py
test_document_multiline_edit
assert
collection
16
from test.fixtures import DOC_URI, DOC from pylsp.workspace import Document def test_document_multiline_edit(workspace): old = [ "def hello(a, b):\n", " print a\n", " print b\n" ] doc = Document('file:///uri', workspace, ''.join(old)) doc.apply_change({'text': 'print a, b'...
[ "def hello(a, b):\n", " print a, b\n" ]
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_language_server.py
client_server
assert
none_literal
30
import os import time import multiprocessing import sys from threading import Thread from flaky import flaky from pylsp_jsonrpc.exceptions import JsonRpcMethodNotFound import pytest from pylsp.python_lsp import start_io_lang_server, PythonLSPServer CALL_TIMEOUT = 10 RUNNING_IN_CI = bool(os.environ.get('CI')) def st...
None
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_language_server.py
client_exited_server
assert
bool_literal
42
import os import time import multiprocessing import sys from threading import Thread from flaky import flaky from pylsp_jsonrpc.exceptions import JsonRpcMethodNotFound import pytest from pylsp.python_lsp import start_io_lang_server, PythonLSPServer CALL_TIMEOUT = 10 RUNNING_IN_CI = bool(os.environ.get('CI')) def st...
False
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_language_server.py
test_initialize
assert
variable
50
import os import time import multiprocessing import sys from threading import Thread from flaky import flaky from pylsp_jsonrpc.exceptions import JsonRpcMethodNotFound import pytest from pylsp.python_lsp import start_io_lang_server, PythonLSPServer CALL_TIMEOUT = 10 RUNNING_IN_CI = bool(os.environ.get('CI')) def st...
response
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_language_server.py
test_missing_message
pytest.raises
variable
46
import os import time import multiprocessing import sys from threading import Thread from flaky import flaky from pylsp_jsonrpc.exceptions import JsonRpcMethodNotFound import pytest from pylsp.python_lsp import start_io_lang_server, PythonLSPServer CALL_TIMEOUT = 10 RUNNING_IN_CI = bool(os.environ.get('CI')) def st...
JsonRpcMethodNotFound)
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_text_edit.py
test_apply_text_edits_multiline
assert
string_literal
11
from pylsp.text_edit import OverLappingTextEditException, apply_text_edits from pylsp import uris DOC_URI = uris.from_fs_path(__file__) def test_apply_text_edits_multiline(pylsp): pylsp.workspace.put_document(DOC_URI, '0\n1\n2\n3\n4') test_doc = pylsp.workspace.get_document(DOC_URI) assert
'0\n1World\nHello3\n4'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_text_edit.py
test_apply_text_edits_replace
assert
string_literal
11
from pylsp.text_edit import OverLappingTextEditException, apply_text_edits from pylsp import uris DOC_URI = uris.from_fs_path(__file__) def test_apply_text_edits_replace(pylsp): pylsp.workspace.put_document(DOC_URI, '012345678901234567890123456789') test_doc = pylsp.workspace.get_document(DOC_URI) asser...
'012Hello678901234567890123456789'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_text_edit.py
test_apply_text_edits_replace
assert
string_literal
24
from pylsp.text_edit import OverLappingTextEditException, apply_text_edits from pylsp import uris DOC_URI = uris.from_fs_path(__file__) def test_apply_text_edits_replace(pylsp): pylsp.workspace.put_document(DOC_URI, '012345678901234567890123456789') test_doc = pylsp.workspace.get_document(DOC_URI) assert...
'012HelloWorld901234567890123456789'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_text_edit.py
test_apply_text_edits_insert
assert
string_literal
11
from pylsp.text_edit import OverLappingTextEditException, apply_text_edits from pylsp import uris DOC_URI = uris.from_fs_path(__file__) def test_apply_text_edits_insert(pylsp): pylsp.workspace.put_document(DOC_URI, '012345678901234567890123456789') test_doc = pylsp.workspace.get_document(DOC_URI) assert...
'Hello012345678901234567890123456789'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_text_edit.py
test_apply_text_edits_insert
assert
string_literal
24
from pylsp.text_edit import OverLappingTextEditException, apply_text_edits from pylsp import uris DOC_URI = uris.from_fs_path(__file__) def test_apply_text_edits_insert(pylsp): pylsp.workspace.put_document(DOC_URI, '012345678901234567890123456789') test_doc = pylsp.workspace.get_document(DOC_URI) assert ...
'0Hello12345678901234567890123456789'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_text_edit.py
test_apply_text_edits_replace
assert
string_literal
49
from pylsp.text_edit import OverLappingTextEditException, apply_text_edits from pylsp import uris DOC_URI = uris.from_fs_path(__file__) def test_apply_text_edits_replace(pylsp): pylsp.workspace.put_document(DOC_URI, '012345678901234567890123456789') test_doc = pylsp.workspace.get_document(DOC_URI) assert...
'012HelloWorld678901234567890123456789'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_text_edit.py
test_apply_text_edits_replace
assert
string_literal
99
from pylsp.text_edit import OverLappingTextEditException, apply_text_edits from pylsp import uris DOC_URI = uris.from_fs_path(__file__) def test_apply_text_edits_replace(pylsp): pylsp.workspace.put_document(DOC_URI, '012345678901234567890123456789') test_doc = pylsp.workspace.get_document(DOC_URI) assert...
'012WorldHello678901234567890123456789'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_text_edit.py
test_apply_text_edits_insert
assert
string_literal
37
from pylsp.text_edit import OverLappingTextEditException, apply_text_edits from pylsp import uris DOC_URI = uris.from_fs_path(__file__) def test_apply_text_edits_insert(pylsp): pylsp.workspace.put_document(DOC_URI, '012345678901234567890123456789') test_doc = pylsp.workspace.get_document(DOC_URI) assert ...
'0HelloWorld12345678901234567890123456789'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_text_edit.py
test_apply_text_edits_insert
assert
string_literal
62
from pylsp.text_edit import OverLappingTextEditException, apply_text_edits from pylsp import uris DOC_URI = uris.from_fs_path(__file__) def test_apply_text_edits_insert(pylsp): pylsp.workspace.put_document(DOC_URI, '012345678901234567890123456789') test_doc = pylsp.workspace.get_document(DOC_URI) assert ...
'0HelloWorld1OneTwoThree2345678901234567890123456789'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_uris.py
test_from_fs_path
assert
variable
12
from test import unix_only, windows_only import pytest from pylsp import uris @unix_only @pytest.mark.parametrize('path,uri', [ ('/foo/bar', 'file:///foo/bar'), ('/foo/space ?bar', 'file:///foo/space%20%3Fbar'), ]) def test_from_fs_path(path, uri): assert uris.from_fs_path(path) ==
uri
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_uris.py
test_to_fs_path
assert
variable
13
from test import unix_only, windows_only import pytest from pylsp import uris @unix_only @pytest.mark.parametrize('uri,path', [ ('file:///foo/bar#frag', '/foo/bar'), ('file:/foo/bar#frag', '/foo/bar'), ('file:/foo/space%20%3Fbar#frag', '/foo/space ?bar'), ]) def test_to_fs_path(uri, path): assert uris...
path
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_uris.py
test_uri_with
assert
variable
11
from test import unix_only, windows_only import pytest from pylsp import uris @pytest.mark.parametrize('uri,kwargs,new_uri', [ ('file:///foo/bar', {'path': '/baz/boo'}, 'file:///baz/boo'), ('file:///D:/hello%20world.py', {'path': 'D:/hello universe.py'}, 'file:///d:/hello%20universe.py') ]) def test_uri_with(u...
new_uri
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_utils.py
test_debounce
assert
numeric_literal
26
import time from unittest import mock from flaky import flaky from pylsp import _utils @flaky(max_runs=6, min_passes=1) def test_debounce(): interval = 0.1 obj = mock.Mock() @_utils.debounce(0.1) def call_m(): obj() assert not obj.mock_calls call_m() call_m() call_m() a...
1
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_utils.py
test_debounce
assert
numeric_literal
30
import time from unittest import mock from flaky import flaky from pylsp import _utils @flaky(max_runs=6, min_passes=1) def test_debounce(): interval = 0.1 obj = mock.Mock() @_utils.debounce(0.1) def call_m(): obj() assert not obj.mock_calls call_m() call_m() call_m() a...
2
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_utils.py
test_debounce_keyed_by
assert
numeric_literal
31
import time from unittest import mock from flaky import flaky from pylsp import _utils @flaky(max_runs=6, min_passes=1) def test_debounce_keyed_by(): interval = 0.1 obj = mock.Mock() @_utils.debounce(0.1, keyed_by='key') def call_m(key): obj(key) assert not obj.mock_calls call_m(1)...
3
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_utils.py
test_debounce_keyed_by
assert
numeric_literal
37
import time from unittest import mock from flaky import flaky from pylsp import _utils @flaky(max_runs=6, min_passes=1) def test_debounce_keyed_by(): interval = 0.1 obj = mock.Mock() @_utils.debounce(0.1, keyed_by='key') def call_m(key): obj(key) assert not obj.mock_calls call_m(1)...
4
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_utils.py
test_clip_column
assert
numeric_literal
10
import time from unittest import mock from flaky import flaky from pylsp import _utils def test_clip_column(): assert _utils.clip_column(0, [], 0) ==
0
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_utils.py
test_list_to_string
assert
string_literal
10
import time from unittest import mock from flaky import flaky from pylsp import _utils def test_list_to_string(): assert _utils.list_to_string("string") ==
"string"
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_utils.py
test_list_to_string
assert
string_literal
11
import time from unittest import mock from flaky import flaky from pylsp import _utils def test_list_to_string(): assert _utils.list_to_string("string") == "string" assert _utils.list_to_string(["a", "r", "r", "a", "y"]) ==
"a,r,r,a,y"
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_utils.py
test_find_parents
assert
collection
14
import time from unittest import mock from flaky import flaky from pylsp import _utils def test_find_parents(tmpdir): subsubdir = tmpdir.ensure_dir("subdir", "subsubdir") path = subsubdir.ensure("path.py") test_cfg = tmpdir.ensure("test.cfg") assert _utils.find_parents(tmpdir.strpath, path.strpath,...
[test_cfg.strpath]
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_utils.py
test_merge_dicts
assert
collection
10
import time from unittest import mock from flaky import flaky from pylsp import _utils def test_merge_dicts(): asser
{'a': False, 'b': {'x': 123, 'y': [], 'z': 987}}
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_utils.py
test_debounce_keyed_by
assert_*
collection
26
import time from unittest import mock from flaky import flaky from pylsp import _utils @flaky(max_runs=6, min_passes=1) def test_debounce_keyed_by(): interval = 0.1 obj = mock.Mock() @_utils.debounce(0.1, keyed_by='key') def call_m(key): obj(key) assert not obj.mock_calls call_m(1)...
[ mock.call(1), mock.call(2), mock.call(3), ])
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_workspace.py
test_multiple_workspaces_from_initialize
assert
numeric_literal
16
import os import pathlib import pytest from pylsp import uris DOC_URI = uris.from_fs_path(__file__) def path_as_uri(path): return pathlib.Path(os.path.abspath(path)).as_uri() def test_multiple_workspaces_from_initialize(pylsp_w_workspace_folders): pylsp, workspace_folders = pylsp_w_workspace_folders a...
2
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_workspace.py
test_progress_simple
assert
numeric_literal
21
import os import pathlib import pytest from pylsp import uris DOC_URI = uris.from_fs_path(__file__) def path_as_uri(path): return pathlib.Path(os.path.abspath(path)).as_uri() def test_progress_simple(workspace, consumer): with workspace.report_progress("some_title"): pass # same method for all ...
1
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_workspace.py
test_workspace_loads_pycodestyle_config
assert
numeric_literal
55
import os import pathlib import pytest from pylsp import uris DOC_URI = uris.from_fs_path(__file__) def path_as_uri(path): return pathlib.Path(os.path.abspath(path)).as_uri() @pytest.mark.skipif(os.name == 'nt', reason="Fails on Windows") def test_workspace_loads_pycodestyle_config(pylsp, tmpdir): workspace...
20
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_workspace.py
test_rm_document
assert
none_literal
17
import os import pathlib import pytest from pylsp import uris DOC_URI = uris.from_fs_path(__file__) def path_as_uri(path): return pathlib.Path(os.path.abspath(path)).as_uri() def test_rm_document(pylsp): pylsp.workspace.put_document(DOC_URI, 'TEXT') assert pylsp.workspace.get_document(DOC_URI).source ==...
None
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_workspace.py
test_workspace_loads_pycodestyle_config
assert
numeric_literal
34
import os import pathlib import pytest from pylsp import uris DOC_URI = uris.from_fs_path(__file__) def path_as_uri(path): return pathlib.Path(os.path.abspath(path)).as_uri() @pytest.mark.skipif(os.name == 'nt', reason="Fails on Windows") def test_workspace_loads_pycodestyle_config(pylsp, tmpdir): workspace...
1000
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_workspace.py
test_get_document
assert
string_literal
15
import os import pathlib import pytest from pylsp import uris DOC_URI = uris.from_fs_path(__file__) def path_as_uri(path): return pathlib.Path(os.path.abspath(path)).as_uri() def test_get_document(pylsp): pylsp.workspace.put_document(DOC_URI, 'TEXT') assert pylsp.workspace.get_document(DOC_URI).source ...
'TEXT'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_workspace.py
test_multiple_workspaces_from_initialize
assert
complex_expr
23
import os import pathlib import pytest from pylsp import uris DOC_URI = uris.from_fs_path(__file__) def path_as_uri(path): return pathlib.Path(os.path.abspath(path)).as_uri() def test_multiple_workspaces_from_initialize(pylsp_w_workspace_folders): pylsp, workspace_folders = pylsp_w_workspace_folders as...
pylsp.root_uri
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/test_workspace.py
test_multiple_workspaces_from_initialize
assert
complex_expr
21
import os import pathlib import pytest from pylsp import uris DOC_URI = uris.from_fs_path(__file__) def path_as_uri(path): return pathlib.Path(os.path.abspath(path)).as_uri() def test_multiple_workspaces_from_initialize(pylsp_w_workspace_folders): pylsp, workspace_folders = pylsp_w_workspace_folders as...
pylsp.workspaces
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/commands/completion/test_completions_command.py
test_invalid_shell
pytest.raises
variable
23
from __future__ import annotations import os from typing import TYPE_CHECKING import pytest from cleo.application import Application from cleo.testers.command_tester import CommandTester from tests.commands.completion.fixtures.command_with_colons import CommandWithColons from tests.commands.completion.fixtures.hell...
ValueError)
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/commands/completion/test_completions_command.py
test_bash
assert
func_call
37
from __future__ import annotations import os from typing import TYPE_CHECKING import pytest from cleo.application import Application from cleo.testers.command_tester import CommandTester from tests.commands.completion.fixtures.command_with_colons import CommandWithColons from tests.commands.completion.fixtures.hell...
tester.io.fetch_output().replace("\r\n", "\n")
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/commands/test_command.py
test_with_signature
assert
numeric_literal
17
from __future__ import annotations from cleo.application import Application from cleo.commands.command import Command from cleo.helpers import argument from cleo.testers.command_tester import CommandTester from tests.fixtures.inherited_command import ChildCommand from tests.fixtures.signature_command import SignatureC...
2
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/commands/test_command.py
test_with_signature
assert
string_literal
16
from __future__ import annotations from cleo.application import Application from cleo.commands.command import Command from cleo.helpers import argument from cleo.testers.command_tester import CommandTester from tests.fixtures.inherited_command import ChildCommand from tests.fixtures.signature_command import SignatureC...
"help"
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/commands/test_command.py
test_signature_inheritance
assert
string_literal
14
from __future__ import annotations from cleo.application import Application from cleo.commands.command import Command from cleo.helpers import argument from cleo.testers.command_tester import CommandTester from tests.fixtures.inherited_command import ChildCommand from tests.fixtures.signature_command import SignatureC...
"parent"
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/commands/test_command.py
test_overwrite
assert
variable
18
from __future__ import annotations from cleo.application import Application from cleo.commands.command import Command from cleo.helpers import argument from cleo.testers.command_tester import CommandTester from tests.fixtures.inherited_command import ChildCommand from tests.fixtures.signature_command import SignatureC...
expected
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/commands/test_command.py
test_explicit_multiple_argument
assert
string_literal
17
from __future__ import annotations from cleo.application import Application from cleo.commands.command import Command from cleo.helpers import argument from cleo.testers.command_tester import CommandTester from tests.fixtures.inherited_command import ChildCommand from tests.fixtures.signature_command import SignatureC...
"1,2,3\n"
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/commands/test_command.py
test_set_application
assert
variable
16
from __future__ import annotations from cleo.application import Application from cleo.commands.command import Command from cleo.helpers import argument from cleo.testers.command_tester import CommandTester from tests.fixtures.inherited_command import ChildCommand from tests.fixtures.signature_command import SignatureC...
application
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/commands/test_command.py
test_with_signature
assert
string_literal
15
from __future__ import annotations from cleo.application import Application from cleo.commands.command import Command from cleo.helpers import argument from cleo.testers.command_tester import CommandTester from tests.fixtures.inherited_command import ChildCommand from tests.fixtures.signature_command import SignatureC...
"description"
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/commands/test_command.py
test_signature_inheritance
assert
string_literal
15
from __future__ import annotations from cleo.application import Application from cleo.commands.command import Command from cleo.helpers import argument from cleo.testers.command_tester import CommandTester from tests.fixtures.inherited_command import ChildCommand from tests.fixtures.signature_command import SignatureC...
"Parent Command."
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/commands/test_command.py
test_with_signature
assert
string_literal
14
from __future__ import annotations from cleo.application import Application from cleo.commands.command import Command from cleo.helpers import argument from cleo.testers.command_tester import CommandTester from tests.fixtures.inherited_command import ChildCommand from tests.fixtures.signature_command import SignatureC...
"signature:command"
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/events/test_event_dispatcher.py
test_add_listener
assert
numeric_literal
24
from __future__ import annotations from typing import TYPE_CHECKING import pytest from cleo.events.event import Event from cleo.events.event_dispatcher import EventDispatcher def dispatcher() -> EventDispatcher: return EventDispatcher() def listener() -> EventListener: return EventListener() def test_add_...
1
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/events/test_event_dispatcher.py
test_add_listener
assert
numeric_literal
26
from __future__ import annotations from typing import TYPE_CHECKING import pytest from cleo.events.event import Event from cleo.events.event_dispatcher import EventDispatcher def dispatcher() -> EventDispatcher: return EventDispatcher() def listener() -> EventListener: return EventListener() def test_add_...
2
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/events/test_event_dispatcher.py
test_get_listener_priority
assert
numeric_literal
25
from __future__ import annotations from typing import TYPE_CHECKING import pytest from cleo.events.event import Event from cleo.events.event_dispatcher import EventDispatcher def dispatcher() -> EventDispatcher: return EventDispatcher() def listener() -> EventListener: return EventListener() def test_get_...
0
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/events/test_event_dispatcher.py
test_get_listener_priority
assert
numeric_literal
24
from __future__ import annotations from typing import TYPE_CHECKING import pytest from cleo.events.event import Event from cleo.events.event_dispatcher import EventDispatcher def dispatcher() -> EventDispatcher: return EventDispatcher() def listener() -> EventListener: return EventListener() def test_get_...
-10
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/events/test_event_dispatcher.py
test_get_listener_priority
assert
none_literal
26
from __future__ import annotations from typing import TYPE_CHECKING import pytest from cleo.events.event import Event from cleo.events.event_dispatcher import EventDispatcher def dispatcher() -> EventDispatcher: return EventDispatcher() def listener() -> EventListener: return EventListener() def test_get_...
None
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/events/test_event_dispatcher.py
test_get_all_listeners_sorts_by_priority
assert
variable
38
from __future__ import annotations from typing import TYPE_CHECKING import pytest from cleo.events.event import Event from cleo.events.event_dispatcher import EventDispatcher def dispatcher() -> EventDispatcher: return EventDispatcher() def listener() -> EventListener: return EventListener() def test_get_...
expected
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/events/test_event_dispatcher.py
test_initial_state
assert
func_call
18
from __future__ import annotations from typing import TYPE_CHECKING import pytest from cleo.events.event import Event from cleo.events.event_dispatcher import EventDispatcher def dispatcher() -> EventDispatcher: return EventDispatcher() def listener() -> EventListener: return EventListener() def test_init...
dispatcher.get_listeners()
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/events/test_event_dispatcher.py
test_get_listeners_sorts_by_priority
assert
func_call
28
from __future__ import annotations from typing import TYPE_CHECKING import pytest from cleo.events.event import Event from cleo.events.event_dispatcher import EventDispatcher def dispatcher() -> EventDispatcher: return EventDispatcher() def listener() -> EventListener: return EventListener() def test_get_...
dispatcher.get_listeners(PRE_FOO)
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/fixtures/foo_command.py
handle
assert
none_literal
20
from __future__ import annotations from typing import TYPE_CHECKING from cleo.commands.command import Command class FooCommand(Command): name = "foo bar" description = "The foo bar command" aliases = ["afoobar"] def interact(self, io: IO) -> None: io.write_line("interact called") def...
None
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/formatters/test_formatter.py
test_format_and_wrap
assert
variable
83
from __future__ import annotations import pytest from cleo.formatters.formatter import Formatter @pytest.mark.parametrize( ["text", "width", "expected"], [ ( "foo<error>bar</error> baz", 2, "fo\no\x1b[31;1mb\x1b[39;22m\n\x1b[31;1mar\x1b[39;22m\nba\nz", ), ...
expected
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/io/inputs/test_argument.py
test_list_argument
assert
collection
16
from __future__ import annotations import pytest from cleo.exceptions import LogicException from cleo.io.inputs.argument import Argument def test_list_argument() -> None: argument = Argument("foo", is_list=True, description="Foo description") assert argument.name == "foo" assert argument.is_required() ...
[]
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/io/inputs/test_argument.py
test_required_non_list_argument
assert
none_literal
16
from __future__ import annotations import pytest from cleo.exceptions import LogicException from cleo.io.inputs.argument import Argument def test_required_non_list_argument() -> None: argument = Argument("foo", is_list=False, description="Foo description") assert argument.name == "foo" assert argument.i...
None
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/io/inputs/test_argument.py
test_optional_non_list_argument
assert
string_literal
18
from __future__ import annotations import pytest from cleo.exceptions import LogicException from cleo.io.inputs.argument import Argument def test_optional_non_list_argument() -> None: argument = Argument( "foo", required=False, is_list=False, description="Foo description", ...
"foo"
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/io/inputs/test_argument.py
test_optional_non_list_argument
assert
string_literal
22
from __future__ import annotations import pytest from cleo.exceptions import LogicException from cleo.io.inputs.argument import Argument def test_optional_non_list_argument() -> None: argument = Argument( "foo", required=False, is_list=False, description="Foo description", ...
"bar"
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/io/inputs/test_argument.py
test_optional_non_list_argument
assert
string_literal
21
from __future__ import annotations import pytest from cleo.exceptions import LogicException from cleo.io.inputs.argument import Argument def test_optional_non_list_argument() -> None: argument = Argument( "foo", required=False, is_list=False, description="Foo description", ...
"Foo description"
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/io/inputs/test_argument.py
test_required_arguments_do_not_support_default_values
pytest.raises
complex_expr
10
from __future__ import annotations import pytest from cleo.exceptions import LogicException from cleo.io.inputs.argument import Argument def test_required_arguments_do_not_support_default_values() -> None: with
LogicException, match="Cannot set a default value for required arguments")
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/io/inputs/test_argument.py
test_list_arguments_do_not_support_non_list_default_values
pytest.raises
complex_expr
10
from __future__ import annotations import pytest from cleo.exceptions import LogicException from cleo.io.inputs.argument import Argument def test_list_arguments_do_not_support_non_list_default_values() -> None: with
LogicException, match="A default value for a list argument must be a list")
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/io/inputs/test_argv_input.py
test_it_uses_argv_by_default
assert
complex_expr
27
from __future__ import annotations import sys from typing import TYPE_CHECKING import pytest from cleo.io.inputs.argument import Argument from cleo.io.inputs.argv_input import ArgvInput from cleo.io.inputs.definition import Definition from cleo.io.inputs.option import Option def argv() -> Iterator[None]: origi...
i._tokens
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/io/inputs/test_argv_input.py
test_parse_arguments
assert
collection
26
from __future__ import annotations import sys from typing import TYPE_CHECKING import pytest from cleo.io.inputs.argument import Argument from cleo.io.inputs.argv_input import ArgvInput from cleo.io.inputs.definition import Definition from cleo.io.inputs.option import Option def argv() -> Iterator[None]: origi...
{"name": "foo"}
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/io/inputs/test_argv_input.py
test_parse_options
assert
variable
132
from __future__ import annotations import sys from typing import TYPE_CHECKING import pytest from cleo.io.inputs.argument import Argument from cleo.io.inputs.argv_input import ArgvInput from cleo.io.inputs.definition import Definition from cleo.io.inputs.option import Option def argv() -> Iterator[None]: origi...
expected_options
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/io/inputs/test_option.py
test_shortcut
assert
string_literal
13
from __future__ import annotations import pytest from cleo.exceptions import LogicException from cleo.exceptions import ValueException from cleo.io.inputs.option import Option def test_shortcut() -> None: opt = Option("option", "o") assert opt.shortcut ==
"o"
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/io/inputs/test_option.py
test_create
assert
none_literal
14
from __future__ import annotations import pytest from cleo.exceptions import LogicException from cleo.exceptions import ValueException from cleo.io.inputs.option import Option def test_create() -> None: opt = Option("option") assert opt.name == "option" assert opt.shortcut is
None
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor
python-poetry/cleo
e7687e99288f013400293236b113a1010d9a57ee
99
train
train
tests/io/inputs/test_option.py
test_create
assert
string_literal
13
from __future__ import annotations import pytest from cleo.exceptions import LogicException from cleo.exceptions import ValueException from cleo.io.inputs.option import Option def test_create() -> None: opt = Option("option") assert opt.name ==
"option"
e7687e99288f013400293236b113a1010d9a57ee
99
v2_extractor_at_anchor