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
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_document.py
test_document_line_edit
assert
complex_expr
14
from test.fixtures import DOC_URI, DOC from pyls.workspace import Document def test_document_line_edit(): doc = Document('file:///uri', u'itshelloworld') doc.apply_change({ 'text': u'goodbye', 'range': { 'start': {'line': 0, 'character': 3}, 'end': {'line': 0, 'character...
u'itsgoodbyeworld'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_document.py
test_document_end_of_file_edit
assert
collection
15
from test.fixtures import DOC_URI, DOC from pyls.workspace import Document def test_document_end_of_file_edit(): old = [ "print 'a'\n", "print 'b'\n" ] doc = Document('file:///uri', u''.join(old)) doc.apply_change({'text': u'o', 'range': { 'start': {'line': 2, 'character': 0}, ...
[ "print 'a'\n", "print 'b'\n", "o", ]
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_document.py
test_document_multiline_edit
assert
collection
16
from test.fixtures import DOC_URI, DOC from pyls.workspace import Document def test_document_multiline_edit(): old = [ "def hello(a, b):\n", " print a\n", " print b\n" ] doc = Document('file:///uri', u''.join(old)) doc.apply_change({'text': u'print a, b', 'range': { ...
[ "def hello(a, b):\n", " print a, b\n" ]
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_language_server.py
client_server
assert
none_literal
28
import os import time import multiprocessing from threading import Thread from test import unix_only from pyls_jsonrpc.exceptions import JsonRpcMethodNotFound import pytest from pyls.python_ls import start_io_lang_server, PythonLanguageServer CALL_TIMEOUT = 10 def start_client(client): client.start() @pytest.f...
None
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_language_server.py
client_exited_server
assert
bool_literal
40
import os import time import multiprocessing from threading import Thread from test import unix_only from pyls_jsonrpc.exceptions import JsonRpcMethodNotFound import pytest from pyls.python_ls import start_io_lang_server, PythonLanguageServer CALL_TIMEOUT = 10 def start_client(client): client.start() def clien...
False
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_language_server.py
test_initialize
assert
variable
46
import os import time import multiprocessing from threading import Thread from test import unix_only from pyls_jsonrpc.exceptions import JsonRpcMethodNotFound import pytest from pyls.python_ls import start_io_lang_server, PythonLanguageServer CALL_TIMEOUT = 10 def start_client(client): client.start() def clien...
response
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_language_server.py
test_missing_message
pytest.raises
variable
42
import os import time import multiprocessing from threading import Thread from test import unix_only from pyls_jsonrpc.exceptions import JsonRpcMethodNotFound import pytest from pyls.python_ls import start_io_lang_server, PythonLanguageServer CALL_TIMEOUT = 10 def start_client(client): client.start() def clien...
JsonRpcMethodNotFound)
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_uris.py
test_from_fs_path
assert
variable
12
from test import unix_only, windows_only import pytest from pyls 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
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_uris.py
test_to_fs_path
assert
variable
13
from test import unix_only, windows_only import pytest from pyls 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
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_uris.py
test_uri_with
assert
variable
11
from test import unix_only, windows_only import pytest from pyls 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(ur...
new_uri
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_utils.py
test_debounce
assert
numeric_literal
25
import time import sys import mock from pyls import _utils 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() assert not obj.mock_calls time.sleep(interval * 2) a...
1
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_utils.py
test_debounce
assert
numeric_literal
29
import time import sys import mock from pyls import _utils 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() assert not obj.mock_calls time.sleep(interval * 2) as...
2
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_utils.py
test_debounce_keyed_by
assert
numeric_literal
30
import time import sys import mock from pyls import _utils 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) call_m(2) call_m(3) assert not obj.mock_calls ...
3
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_utils.py
test_debounce_keyed_by
assert
numeric_literal
36
import time import sys import mock from pyls import _utils 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) call_m(2) call_m(3) assert not obj.mock_calls ...
4
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_utils.py
test_clip_column
assert
numeric_literal
10
import time import sys import mock from pyls import _utils def test_clip_column(): assert _utils.clip_column(0, [], 0) ==
0
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_utils.py
test_list_to_string
assert
string_literal
10
import time import sys import mock from pyls import _utils def test_list_to_string(): assert _utils.list_to_string("string") ==
"string"
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_utils.py
test_list_to_string
assert
string_literal
11
import time import sys import mock from pyls 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"
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_utils.py
test_find_parents
assert
collection
14
import time import sys import mock from pyls 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"]) ==
[test_cfg.strpath]
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_utils.py
test_merge_dicts
assert
collection
10
import time import sys import mock from pyls import _utils def test_merge_dicts(): asser
{'a': False, 'b': {'x': 123, 'y': [], 'z': 987}}
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_utils.py
test_debounce_keyed_by
assert_*
collection
25
import time import sys import mock from pyls import _utils 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) call_m(2) call_m(3) assert not obj.mock_calls ...
[ mock.call(1), mock.call(2), mock.call(3), ])
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_workspace.py
test_rm_document
assert
none_literal
20
import os import sys import pytest from pyls import uris PY2 = sys.version_info.major == 2 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(pyls): pyls.workspace.put_document(DOC_URI, 'TEXT') assert pyls.workspace.get...
None
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_workspace.py
test_get_document
assert
string_literal
18
import os import sys import pytest from pyls import uris PY2 = sys.version_info.major == 2 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(pyls): pyls.workspace.put_document(DOC_URI, 'TEXT') assert pyls.workspace.g...
'TEXT'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_workspace.py
test_multiple_workspaces
assert
complex_expr
57
import os import sys import pytest from pyls import uris PY2 = sys.version_info.major == 2 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(tmpdir, pyls): workspace1_dir = tmpdir.mkdir('workspace1') workspace2...
pyls.workspaces
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_workspace.py
test_non_root_project
assert
func_call
30
import os import sys import pytest from pyls import uris PY2 = sys.version_info.major == 2 DOC_URI = uris.from_fs_path(__file__) def path_as_uri(path): return pathlib.Path(os.path.abspath(path)).as_uri() @pytest.mark.parametrize('metafiles', [('setup.py',), ('pyproject.toml',), ('setup.py', 'pyproject.toml')]...
test_doc.sys_path()
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_workspace.py
test_put_document
assert
complex_expr
18
import os import sys import pytest from pyls import uris PY2 = sys.version_info.major == 2 DOC_URI = uris.from_fs_path(__file__) def path_as_uri(path): return pathlib.Path(os.path.abspath(path)).as_uri() def test_put_document(pyls): pyls.workspace.put_document(DOC_URI, 'content') assert DOC_URI in
pyls.workspace._docs
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_workspace.py
test_multiple_workspaces
assert
complex_expr
43
import os import sys import pytest from pyls import uris PY2 = sys.version_info.major == 2 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(tmpdir, pyls): workspace1_dir = tmpdir.mkdir('workspace1') workspace2...
pyls.workspaces[workspace1_uri]._docs
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
examples/blog/test_blog.py
test_create
assert
numeric_literal
24
import pytest from blog import app, _init_db def _test_app(tmpdir): app.config['DATABASE'] = str(tmpdir.join('blog.db')) _init_db() return app @pytest.mark.asyncio async def test_create(test_app): test_client = test_app.test_client() await test_client.post( '/login/', form={ ...
301
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
examples/blog/test_blog.py
test_create
assert
variable
27
import pytest from blog import app, _init_db def _test_app(tmpdir): app.config['DATABASE'] = str(tmpdir.join('blog.db')) _init_db() return app @pytest.mark.asyncio async def test_create(test_app): test_client = test_app.test_client() await test_client.post( '/login/', form={ ...
body
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_app.py
test_host_matching
assert
numeric_literal
33
from __future__ import annotations import asyncio from typing import AsyncGenerator, NoReturn, Optional, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import InternalServe...
200
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_app.py
test_host_matching
assert
numeric_literal
36
from __future__ import annotations import asyncio from typing import AsyncGenerator, NoReturn, Optional, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import InternalServe...
404
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_app.py
test_app_route_exception
assert
numeric_literal
40
from __future__ import annotations import asyncio from typing import AsyncGenerator, NoReturn, Optional, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import InternalServe...
500
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_app.py
test_test_app
assert
collection
94
from __future__ import annotations import asyncio from typing import AsyncGenerator, NoReturn, Optional, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import InternalServe...
[1]
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_app.py
test_subdomain
assert
string_literal
34
from __future__ import annotations import asyncio from typing import AsyncGenerator, NoReturn, Optional, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import InternalServe...
"sub"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_app.py
test_add_url_rule_methods
assert
variable
56
from __future__ import annotations import asyncio from typing import AsyncGenerator, NoReturn, Optional, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import InternalServe...
result
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_app.py
test_test_app
assert
collection
96
from __future__ import annotations import asyncio from typing import AsyncGenerator, NoReturn, Optional, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import InternalServe...
[1, 2]
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_app.py
test_background_task
assert
string_literal
82
from __future__ import annotations import asyncio from typing import AsyncGenerator, NoReturn, Optional, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import InternalServe...
"data"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_app.py
test_env_and_debug_environments
assert
variable
49
from __future__ import annotations import asyncio from typing import AsyncGenerator, NoReturn, Optional, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import InternalServe...
expected_env
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_app.py
test_propagation
pytest.raises
variable
77
from __future__ import annotations import asyncio from typing import AsyncGenerator, NoReturn, Optional, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import InternalServe...
SimpleError)
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_app.py
test_env_and_debug_environments
assert
variable
50
from __future__ import annotations import asyncio from typing import AsyncGenerator, NoReturn, Optional, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import InternalServe...
expected_debug
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_app.py
test_endpoint_overwrite
pytest.raises
variable
39
from __future__ import annotations import asyncio from typing import AsyncGenerator, NoReturn, Optional, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import InternalServe...
AssertionError)
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_app.py
test_add_url_rule_automatic_options
assert
variable
49
from __future__ import annotations import asyncio from typing import AsyncGenerator, NoReturn, Optional, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import InternalServe...
expected_methods
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_app.py
test_add_url_rule_automatic_options
assert
variable
50
from __future__ import annotations import asyncio from typing import AsyncGenerator, NoReturn, Optional, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import InternalServe...
expected_automatic
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_app.py
test_make_response
assert
func_call
61
from __future__ import annotations import asyncio from typing import AsyncGenerator, NoReturn, Optional, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import InternalServe...
expected.get_data()
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_asgi.py
test_http_request_without_body
assert
string_literal
57
from __future__ import annotations import asyncio from typing import Optional import pytest from hypercorn.typing import ASGIReceiveEvent, ASGISendEvent, HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from quart import Quart from quart.asgi import _convert_version, ASGIHTTPConnection, ASGIWebs...
b""
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_asgi.py
test__convert_version
assert
collection
16
from __future__ import annotations import asyncio from typing import Optional import pytest from hypercorn.typing import ASGIReceiveEvent, ASGISendEvent, HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from quart import Quart from quart.asgi import _convert_version, ASGIHTTPConnection, ASGIWebs...
[2, 1]
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_asgi.py
test_http_path_from_absolute_target
assert
string_literal
34
from __future__ import annotations import asyncio from typing import Optional import pytest from hypercorn.typing import ASGIReceiveEvent, ASGISendEvent, HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from quart import Quart from quart.asgi import _convert_version, ASGIHTTPConnection, ASGIWebs...
"/path"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_asgi.py
test_http_1_0_host_header
assert
variable
36
from __future__ import annotations import asyncio from typing import Optional import pytest from hypercorn.typing import ASGIReceiveEvent, ASGISendEvent, HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from quart import Quart from quart.asgi import _convert_version, ASGIHTTPConnection, ASGIWebs...
expected
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_asgi.py
test_http_asgi_scope_from_request
assert
string_literal
28
from __future__ import annotations import asyncio from typing import Optional import pytest from hypercorn.typing import ASGIReceiveEvent, ASGISendEvent, HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from quart import Quart from quart.asgi import _convert_version, ASGIHTTPConnection, ASGIWebs...
"PASSED"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_asgi.py
test_websocket_accept_connection
assert_*
collection
41
from __future__ import annotations import asyncio from typing import Optional import pytest from hypercorn.typing import ASGIReceiveEvent, ASGISendEvent, HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from quart import Quart from quart.asgi import _convert_version, ASGIHTTPConnection, ASGIWebs...
{"headers": [], "subprotocol": subprotocol, "type": "websocket.accept"})
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_asgi.py
test_websocket_accept_connection
assert_*
collection
33
from __future__ import annotations import asyncio from typing import Optional import pytest from hypercorn.typing import ASGIReceiveEvent, ASGISendEvent, HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from quart import Quart from quart.asgi import _convert_version, ASGIHTTPConnection, ASGIWebs...
{ "subprotocol": subprotocol, "type": "websocket.accept", "headers": encode_headers(headers), })
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_basic.py
test_index
assert
numeric_literal
80
from __future__ import annotations from typing import AsyncGenerator, cast import pytest from werkzeug.wrappers import Response as WerkzeugResponse from quart import abort, jsonify, Quart, request, Response, ResponseReturnValue, url_for, websocket from quart.testing import WebsocketResponseError def app() -> Quart:...
200
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_basic.py
test_generic_error
assert
numeric_literal
79
from __future__ import annotations from typing import AsyncGenerator, cast import pytest from werkzeug.wrappers import Response as WerkzeugResponse from quart import abort, jsonify, Quart, request, Response, ResponseReturnValue, url_for, websocket from quart.testing import WebsocketResponseError def app() -> Quart:...
409
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_basic.py
test_not_found_error
assert
numeric_literal
79
from __future__ import annotations from typing import AsyncGenerator, cast import pytest from werkzeug.wrappers import Response as WerkzeugResponse from quart import abort, jsonify, Quart, request, Response, ResponseReturnValue, url_for, websocket from quart.testing import WebsocketResponseError def app() -> Quart:...
404
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_basic.py
test_websocket_abort
assert
numeric_literal
82
from __future__ import annotations from typing import AsyncGenerator, cast import pytest from werkzeug.wrappers import Response as WerkzeugResponse from quart import abort, jsonify, Quart, request, Response, ResponseReturnValue, url_for, websocket from quart.testing import WebsocketResponseError def app() -> Quart:...
401
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_basic.py
test_websocket
assert
variable
82
from __future__ import annotations from typing import AsyncGenerator, cast import pytest from werkzeug.wrappers import Response as WerkzeugResponse from quart import abort, jsonify, Quart, request, Response, ResponseReturnValue, url_for, websocket from quart.testing import WebsocketResponseError def app() -> Quart:...
data
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_basic.py
test_make_response_str
assert
string_literal
84
from __future__ import annotations from typing import AsyncGenerator, cast import pytest from werkzeug.wrappers import Response as WerkzeugResponse from quart import abort, jsonify, Quart, request, Response, ResponseReturnValue, url_for, websocket from quart.testing import WebsocketResponseError def app() -> Quart:...
"value"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_blueprints.py
test_blueprint_error_handler
assert
numeric_literal
38
from __future__ import annotations from typing import cast, List, Optional import click import pytest from quart import ( abort, Blueprint, g, Quart, render_template_string, request, ResponseReturnValue, websocket, ) from quart.views import MethodView @pytest.mark.asyncio async def t...
409
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_blueprints.py
test_nesting_url_prefixes
assert
numeric_literal
51
from __future__ import annotations from typing import cast, List, Optional import click import pytest from quart import ( abort, Blueprint, g, Quart, render_template_string, request, ResponseReturnValue, websocket, ) from quart.views import MethodView @pytest.mark.asyncio @pytest.mar...
200
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_blueprints.py
test_blueprint_url_prefix
assert
none_literal
37
from __future__ import annotations from typing import cast, List, Optional import click import pytest from quart import ( abort, Blueprint, g, Quart, render_template_string, request, ResponseReturnValue, websocket, ) from quart.views import MethodView @pytest.mark.asyncio async def t...
None
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_blueprints.py
app_teardown1
assert
string_literal
23
from __future__ import annotations from typing import cast, List, Optional import click import pytest from quart import ( abort, Blueprint, g, Quart, render_template_string, request, ResponseReturnValue, websocket, ) from quart.views import MethodView @app.teardown_request as...
"app_1"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_blueprints.py
app_teardown2
assert
string_literal
23
from __future__ import annotations from typing import cast, List, Optional import click import pytest from quart import ( abort, Blueprint, g, Quart, render_template_string, request, ResponseReturnValue, websocket, ) from quart.views import MethodView @app.teardown_request as...
"app_2"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_blueprints.py
test_blueprint_renaming
assert
string_literal
54
from __future__ import annotations from typing import cast, List, Optional import click import pytest from quart import ( abort, Blueprint, g, Quart, render_template_string, request, ResponseReturnValue, websocket, ) from quart.views import MethodView @pytest.mark.asyncio async def t...
b"Error"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_blueprints.py
test_nested_callback_order
assert
string_literal
103
from __future__ import annotations from typing import cast, List, Optional import click import pytest from quart import ( abort, Blueprint, g, Quart, render_template_string, request, ResponseReturnValue, websocket, ) from quart.views import MethodView @pytest.mark.asyncio async def t...
b"child"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_blueprints.py
test_blueprint_url_prefix
assert
string_literal
40
from __future__ import annotations from typing import cast, List, Optional import click import pytest from quart import ( abort, Blueprint, g, Quart, render_template_string, request, ResponseReturnValue, websocket, ) from quart.views import MethodView @pytest.mark.asyncio async def t...
"prefix"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_blueprints.py
child_teardown1
assert
string_literal
23
from __future__ import annotations from typing import cast, List, Optional import click import pytest from quart import ( abort, Blueprint, g, Quart, render_template_string, request, ResponseReturnValue, websocket, ) from quart.views import MethodView @child.teardown_request ...
"child_1"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_blueprints.py
child_teardown2
assert
string_literal
23
from __future__ import annotations from typing import cast, List, Optional import click import pytest from quart import ( abort, Blueprint, g, Quart, render_template_string, request, ResponseReturnValue, websocket, ) from quart.views import MethodView @child.teardown_request ...
"child_2"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_blueprints.py
parent_teardown1
assert
string_literal
23
from __future__ import annotations from typing import cast, List, Optional import click import pytest from quart import ( abort, Blueprint, g, Quart, render_template_string, request, ResponseReturnValue, websocket, ) from quart.views import MethodView @parent.teardown_request ...
"parent_1"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_blueprints.py
parent_teardown2
assert
string_literal
23
from __future__ import annotations from typing import cast, List, Optional import click import pytest from quart import ( abort, Blueprint, g, Quart, render_template_string, request, ResponseReturnValue, websocket, ) from quart.views import MethodView @parent.teardown_request ...
"parent_2"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_blueprints.py
test_blueprint_renaming
assert
string_literal
50
from __future__ import annotations from typing import cast, List, Optional import click import pytest from quart import ( abort, Blueprint, g, Quart, render_template_string, request, ResponseReturnValue, websocket, ) from quart.views import MethodView @pytest.mark.asyncio async def t...
b"bp.index"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_blueprints.py
test_blueprint_route
assert
string_literal
33
from __future__ import annotations from typing import cast, List, Optional import click import pytest from quart import ( abort, Blueprint, g, Quart, render_template_string, request, ResponseReturnValue, websocket, ) from quart.views import MethodView @pytest.mark.asyncio async def t...
"blueprint"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_blueprints.py
test_unique_blueprint_names
pytest.raises
variable
28
from __future__ import annotations from typing import cast, List, Optional import click import pytest from quart import ( abort, Blueprint, g, Quart, render_template_string, request, ResponseReturnValue, websocket, ) from quart.views import MethodView def test_unique_blueprint_names(...
ValueError)
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_cli.py
test_script_info_load_app
assert
variable
44
from __future__ import annotations import code import os from unittest.mock import Mock import pytest from _pytest.monkeypatch import MonkeyPatch from click.testing import CliRunner import quart.cli from quart.app import Quart from quart.cli import __version__, AppGroup, cli, NoAppException, ScriptInfo def reset_en...
app
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_cli.py
test_version_command
assert
complex_expr
45
from __future__ import annotations import code import os from unittest.mock import Mock import pytest from _pytest.monkeypatch import MonkeyPatch from click.testing import CliRunner import quart.cli from quart.app import Quart from quart.cli import __version__, AppGroup, cli, NoAppException, ScriptInfo def reset_en...
result.output
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_cli.py
test_script_info_load_app_no_app
pytest.raises
variable
45
from __future__ import annotations import code import os from unittest.mock import Mock import pytest from _pytest.monkeypatch import MonkeyPatch from click.testing import CliRunner import quart.cli from quart.app import Quart from quart.cli import __version__, AppGroup, cli, NoAppException, ScriptInfo def reset_en...
NoAppException)
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_config.py
_check_standard_config
assert
numeric_literal
18
from __future__ import annotations import os from pathlib import Path import pytest import toml from quart.config import Config, ConfigAttribute FOO = "bar" BOB = "jeff" def _check_standard_config(config: Config) -> None: assert config.pop("FOO") == "bar" assert config.pop("BOB") == "jeff" assert len(...
0
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_config.py
_check_standard_config
assert
string_literal
16
from __future__ import annotations import os from pathlib import Path import pytest import toml from quart.config import Config, ConfigAttribute FOO = "bar" BOB = "jeff" def _check_standard_config(config: Config) -> None: assert config.pop("FOO") ==
"bar"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_config.py
test_config_attribute
assert
string_literal
18
from __future__ import annotations import os from pathlib import Path import pytest import toml from quart.config import Config, ConfigAttribute FOO = "bar" BOB = "jeff" def test_config_attribute() -> None: instance = ConfigInstance() instance.value = "test" assert instance.config["VALUE"] ==
"test"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_config.py
_check_standard_config
assert
string_literal
17
from __future__ import annotations import os from pathlib import Path import pytest import toml from quart.config import Config, ConfigAttribute FOO = "bar" BOB = "jeff" def _check_standard_config(config: Config) -> None: assert config.pop("FOO") == "bar" assert config.pop("BOB") ==
"jeff"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_config.py
test_config_from_pyfile_no_file
pytest.raises
variable
22
from __future__ import annotations import os from pathlib import Path import pytest import toml from quart.config import Config, ConfigAttribute FOO = "bar" BOB = "jeff" def _check_standard_config(config: Config) -> None: assert config.pop("FOO") == "bar" assert config.pop("BOB") == "jeff" assert len(c...
FileNotFoundError)
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_config.py
test_config_get_namespace
assert
collection
25
from __future__ import annotations import os from pathlib import Path import pytest import toml from quart.config import Config, ConfigAttribute FOO = "bar" BOB = "jeff" def _check_standard_config(config: Config) -> None: assert config.pop("FOO") == "bar" assert config.pop("BOB") == "jeff" assert len(c...
{"a": "a", "bar": "bar"}
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_config.py
test_config_from_pyfile_directory
pytest.raises
complex_expr
22
from __future__ import annotations import os from pathlib import Path import pytest import toml from quart.config import Config, ConfigAttribute FOO = "bar" BOB = "jeff" def _check_standard_config(config: Config) -> None: assert config.pop("FOO") == "bar" assert config.pop("BOB") == "jeff" assert len(c...
PermissionError if os.name == "nt" else IsADirectoryError)
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_ctx.py
test_app_ctx_globals_contains
assert
variable
33
from __future__ import annotations import asyncio from typing import cast from unittest.mock import Mock import pytest from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import BadRequest from quart.app import Quart from quart.ctx import ( ...
g
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_ctx.py
test_copy_current_app_context
assert
numeric_literal
47
from __future__ import annotations import asyncio from typing import cast from unittest.mock import Mock import pytest from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import BadRequest from quart.app import Quart from quart.ctx import ( ...
200
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_ctx.py
within_context
assert
string_literal
32
from __future__ import annotations import asyncio from typing import cast from unittest.mock import Mock import pytest from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import BadRequest from quart.app import Quart from quart.ctx import ( ...
"/"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_ctx.py
test_has_request_context
assert
bool_literal
46
from __future__ import annotations import asyncio from typing import cast from unittest.mock import Mock import pytest from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import BadRequest from quart.app import Quart from quart.ctx import ( ...
True
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_ctx.py
test_app_ctx_globals_pop
assert
none_literal
34
from __future__ import annotations import asyncio from typing import cast from unittest.mock import Mock import pytest from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import BadRequest from quart.app import Quart from quart.ctx import ( ...
None
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_ctx.py
test_copy_current_websocket_context
assert
string_literal
46
from __future__ import annotations import asyncio from typing import cast from unittest.mock import Mock import pytest from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import BadRequest from quart.app import Quart from quart.ctx import ( ...
b"/"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_ctx.py
test_request_context_match
assert
variable
49
from __future__ import annotations import asyncio from typing import cast from unittest.mock import Mock import pytest from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import BadRequest from quart.app import Quart from quart.ctx import ( ...
rule
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_ctx.py
test_has_request_context
assert
bool_literal
48
from __future__ import annotations import asyncio from typing import cast from unittest.mock import Mock import pytest from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import BadRequest from quart.app import Quart from quart.ctx import ( ...
False
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_ctx.py
test_app_ctx_globals_get
assert
string_literal
33
from __future__ import annotations import asyncio from typing import cast from unittest.mock import Mock import pytest from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import BadRequest from quart.app import Quart from quart.ctx import ( ...
"bar"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_ctx.py
test_app_ctx_globals_setdefault
assert
collection
33
from __future__ import annotations import asyncio from typing import cast from unittest.mock import Mock import pytest from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import BadRequest from quart.app import Quart from quart.ctx import ( ...
["bar"]
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_debug.py
test_debug
assert
numeric_literal
18
from __future__ import annotations import pytest from quart import Quart from quart.debug import traceback_response @pytest.mark.asyncio async def test_debug() -> None: app = Quart(__name__) async with app.test_request_context("/"): try: raise Exception("Unique error") except Exce...
500
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_debug.py
test_debug
assert
func_call
19
from __future__ import annotations import pytest from quart import Quart from quart.debug import traceback_response @pytest.mark.asyncio async def test_debug() -> None: app = Quart(__name__) async with app.test_request_context("/"): try: raise Exception("Unique error") except Exce...
await response.get_data()
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_exceptions.py
test_abort
assert
numeric_literal
16
from __future__ import annotations from http import HTTPStatus from typing import Union import pytest from werkzeug.exceptions import abort, HTTPException from quart import Response @pytest.mark.parametrize("status", [400, HTTPStatus.BAD_REQUEST]) def test_abort(status: Union[int, HTTPStatus]) -> None: with pyt...
400
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_exceptions.py
test_abort_with_response
assert
numeric_literal
15
from __future__ import annotations from http import HTTPStatus from typing import Union import pytest from werkzeug.exceptions import abort, HTTPException from quart import Response def test_abort_with_response() -> None: with pytest.raises(HTTPException) as exc_info: abort(Response("Message", 205)) ...
205
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_exceptions.py
test_abort
pytest.raises
variable
14
from __future__ import annotations from http import HTTPStatus from typing import Union import pytest from werkzeug.exceptions import abort, HTTPException from quart import Response @pytest.mark.parametrize("status", [400, HTTPStatus.BAD_REQUEST]) def test_abort(status: Union[int, HTTPStatus]) -> None: with py...
HTTPException)
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_helpers.py
test_make_response
assert
numeric_literal
67
from __future__ import annotations from datetime import datetime, timezone from io import BytesIO from pathlib import Path from typing import AsyncGenerator, List import pytest from py._path.local import LocalPath from werkzeug.exceptions import NotFound from quart import Blueprint, Quart, request from quart.helpers...
202
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_helpers.py
test_url_for
assert
string_literal
66
from __future__ import annotations from datetime import datetime, timezone from io import BytesIO from pathlib import Path from typing import AsyncGenerator, List import pytest from py._path.local import LocalPath from werkzeug.exceptions import NotFound from quart import Blueprint, Quart, request from quart.helpers...
"/"
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_helpers.py
test_send_file_last_modified
assert
variable
72
from __future__ import annotations from datetime import datetime, timezone from io import BytesIO from pathlib import Path from typing import AsyncGenerator, List import pytest from py._path.local import LocalPath from werkzeug.exceptions import NotFound from quart import Blueprint, Quart, request from quart.helpers...
mtime
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor
pallets/quart
01384f4610dc81554cd07af6a6a301f5084d86bc
273
train
train
tests/test_helpers.py
test_flash_category_filter
assert
collection
68
from __future__ import annotations from datetime import datetime, timezone from io import BytesIO from pathlib import Path from typing import AsyncGenerator, List import pytest from py._path.local import LocalPath from werkzeug.exceptions import NotFound from quart import Blueprint, Quart, request from quart.helpers...
["bar"]
01384f4610dc81554cd07af6a6a301f5084d86bc
273
v2_extractor_at_anchor