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
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_connectionpool.py
test_stream_keepalive
assert
variable
72
from __future__ import annotations import io import socket import time import typing import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from unittest import mock from urllib.parse import urlencode import pytest from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warning from ...
x
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_https.py
test_ssl_version_is_deprecated
assert
numeric_literal
163
from __future__ import annotations import contextlib import datetime import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_contex...
1
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_https.py
test_ssl_correct_system_time
assert
variable
143
from __future__ import annotations import contextlib import datetime import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_contex...
w
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_https.py
test_ssl_version_with_protocol_tls_or_client_not_deprecated
assert
collection
172
from __future__ import annotations import contextlib import datetime import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_contex...
[]
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_https.py
test_simple
assert
numeric_literal
140
from __future__ import annotations import contextlib import datetime import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_contex...
200
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_no_ssl.py
test_simple
assert
numeric_literal
16
from __future__ import annotations import pytest import urllib3 from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase from urllib3.exceptions import InsecureRequestWarning from ..test_no_ssl import TestWithoutSSL class TestHTTPWithoutSSL(HTTPDummyServerTestCase, TestWithoutSSL): def...
200
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_no_ssl.py
test_simple
assert
func_call
21
from __future__ import annotations import pytest import urllib3 from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase from urllib3.exceptions import InsecureRequestWarning from ..test_no_ssl import TestWithoutSSL class TestHTTPSWithoutSSL(HTTPSDummyServerTestCase, TestWithoutSSL): d...
str(e)
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_poolmanager.py
test_too_many_redirects
assert
numeric_literal
51
from __future__ import annotations import gzip from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, request from urllib3.con...
1
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_poolmanager.py
test_redirect_without_preload_releases_connection
assert
numeric_literal
30
from __future__ import annotations import gzip from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, request from urllib3.con...
2
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_poolmanager.py
test_top_level_request
assert
numeric_literal
27
from __future__ import annotations import gzip from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, request from urllib3.con...
200
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_poolmanager.py
test_top_level_request_with_redirect
assert
numeric_literal
33
from __future__ import annotations import gzip from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, request from urllib3.con...
303
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_proxy_poolmanager.py
test_proxy_pooling
assert
numeric_literal
68
from __future__ import annotations import binascii import hashlib import ipaddress import os.path import pathlib import shutil import socket import ssl import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL from test.conftest import ServerConfig import pytest import trustme ...
1
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_proxy_poolmanager.py
test_proxy_pooling
assert
numeric_literal
77
from __future__ import annotations import binascii import hashlib import ipaddress import os.path import pathlib import shutil import socket import ssl import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL from test.conftest import ServerConfig import pytest import trustme ...
2
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_proxy_poolmanager.py
test_proxy_pooling
assert
numeric_literal
82
from __future__ import annotations import binascii import hashlib import ipaddress import os.path import pathlib import shutil import socket import ssl import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL from test.conftest import ServerConfig import pytest import trustme ...
3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_proxy_poolmanager.py
test_nagle_proxy
assert
numeric_literal
74
from __future__ import annotations import binascii import hashlib import ipaddress import os.path import pathlib import shutil import socket import ssl import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL from test.conftest import ServerConfig import pytest import trustme ...
0
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_proxy_poolmanager.py
test_basic_proxy
assert
numeric_literal
67
from __future__ import annotations import binascii import hashlib import ipaddress import os.path import pathlib import shutil import socket import ssl import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL from test.conftest import ServerConfig import pytest import trustme ...
200
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_proxy_poolmanager.py
test_redirect
assert
numeric_literal
73
from __future__ import annotations import binascii import hashlib import ipaddress import os.path import pathlib import shutil import socket import ssl import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL from test.conftest import ServerConfig import pytest import trustme ...
303
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_proxy_poolmanager.py
test_proxy_pooling_ext
assert
variable
70
from __future__ import annotations import binascii import hashlib import ipaddress import os.path import pathlib import shutil import socket import ssl import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL from test.conftest import ServerConfig import pytest import trustme ...
hc2
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_socketlevel.py
run_client_cert_with_password_test
assert
numeric_literal
173
from __future__ import annotations import contextlib import errno import io import os import os.path import select import shutil import socket import ssl import sys import tempfile import time import typing from collections import OrderedDict from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIME...
1
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_socketlevel.py
test_chunked_specified
assert
numeric_literal
143
from __future__ import annotations import contextlib import errno import io import os import os.path import select import shutil import socket import ssl import sys import tempfile import time import typing from collections import OrderedDict from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIME...
5
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_socketlevel.py
test_connection_closed_on_read_timeout_preload_false
assert
numeric_literal
157
from __future__ import annotations import contextlib import errno import io import os import os.path import select import shutil import socket import ssl import sys import tempfile import time import typing from collections import OrderedDict from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIME...
8
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_socketlevel.py
test_release_conn_param_is_respected_after_timeout_retry
assert
numeric_literal
150
from __future__ import annotations import contextlib import errno import io import os import os.path import select import shutil import socket import ssl import sys import tempfile import time import typing from collections import OrderedDict from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIME...
2
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_socketlevel.py
test_release_conn_param_is_respected_after_timeout_retry
assert
numeric_literal
152
from __future__ import annotations import contextlib import errno import io import os import os.path import select import shutil import socket import ssl import sys import tempfile import time import typing from collections import OrderedDict from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIME...
0
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_socketlevel.py
test_socket_close_socket_then_file
assert
numeric_literal
120
from __future__ import annotations import contextlib import errno import io import os import os.path import select import shutil import socket import ssl import sys import tempfile import time import typing from collections import OrderedDict from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIME...
-1
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_socketlevel.py
test_multipart_assert_header_parsing_no_defects
assert
numeric_literal
123
from __future__ import annotations import contextlib import errno import io import os import os.path import select import shutil import socket import ssl import sys import tempfile import time import typing from collections import OrderedDict from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIME...
73
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
urllib3/urllib3
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
train
train
test/with_dummyserver/test_socketlevel.py
test_content_length_0_by_default
assert
numeric_literal
118
from __future__ import annotations import contextlib import errno import io import os import os.path import select import shutil import socket import ssl import sys import tempfile import time import typing from collections import OrderedDict from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIME...
200
4c4451b51ddb6e482a81a2607bdcdfe58da8651c
610
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_api.py
test_response_validators
assert
numeric_literal
19
from typing import Any import pytest from tests.test_utils import with_mocked_api from vkbottle import API, ABCRequestRescheduler, CaptchaError, CtxStorage, VKAPIError USERS_GET_RESPONSE = ( '{"response":[{"first_name":"Павел","id":1,"last_name":"Дуров",' '"can_access_closed":true,"is_closed":false}]}' ) ctx...
1
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_api.py
test_request_many
assert
numeric_literal
24
from typing import Any import pytest from tests.test_utils import with_mocked_api from vkbottle import API, ABCRequestRescheduler, CaptchaError, CtxStorage, VKAPIError USERS_GET_RESPONSE = ( '{"response":[{"first_name":"Павел","id":1,"last_name":"Дуров",' '"can_access_closed":true,"is_closed":false}]}' ) ctx...
2
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_api.py
test_captcha_error_handling
assert
numeric_literal
29
from typing import Any import pytest from tests.test_utils import with_mocked_api from vkbottle import API, ABCRequestRescheduler, CaptchaError, CtxStorage, VKAPIError USERS_GET_RESPONSE = ( '{"response":[{"first_name":"Павел","id":1,"last_name":"Дуров",' '"can_access_closed":true,"is_closed":false}]}' ) ctx...
14
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_api.py
test_ignore_errors
assert
none_literal
19
from typing import Any import pytest from tests.test_utils import with_mocked_api from vkbottle import API, ABCRequestRescheduler, CaptchaError, CtxStorage, VKAPIError USERS_GET_RESPONSE = ( '{"response":[{"first_name":"Павел","id":1,"last_name":"Дуров",' '"can_access_closed":true,"is_closed":false}]}' ) ctx...
None
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_api.py
test_api_raw_response
assert
string_literal
21
from typing import Any import pytest from tests.test_utils import with_mocked_api from vkbottle import API, ABCRequestRescheduler, CaptchaError, CtxStorage, VKAPIError USERS_GET_RESPONSE = ( '{"response":[{"first_name":"Павел","id":1,"last_name":"Дуров",' '"can_access_closed":true,"is_closed":false}]}' ) ctx...
"Павел"
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_api.py
test_captcha_error_handling
assert
numeric_literal
30
from typing import Any import pytest from tests.test_utils import with_mocked_api from vkbottle import API, ABCRequestRescheduler, CaptchaError, CtxStorage, VKAPIError USERS_GET_RESPONSE = ( '{"response":[{"first_name":"Павел","id":1,"last_name":"Дуров",' '"can_access_closed":true,"is_closed":false}]}' ) ctx...
239633676097
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_api.py
test_request_many
assert
collection
22
from typing import Any import pytest from tests.test_utils import with_mocked_api from vkbottle import API, ABCRequestRescheduler, CaptchaError, CtxStorage, VKAPIError USERS_GET_RESPONSE = ( '{"response":[{"first_name":"Павел","id":1,"last_name":"Дуров",' '"can_access_closed":true,"is_closed":false}]}' ) ctx...
{"response": 1}
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_api.py
test_types_translator
assert
collection
18
from typing import Any import pytest from tests.test_utils import with_mocked_api from vkbottle import API, ABCRequestRescheduler, CaptchaError, CtxStorage, VKAPIError USERS_GET_RESPONSE = ( '{"response":[{"first_name":"Павел","id":1,"last_name":"Дуров",' '"can_access_closed":true,"is_closed":false}]}' ) ctx...
{"a": "1,2,3,4,hi!"}
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_api.py
reschedule
assert
complex_expr
21
from typing import Any import pytest from tests.test_utils import with_mocked_api from vkbottle import API, ABCRequestRescheduler, CaptchaError, CtxStorage, VKAPIError USERS_GET_RESPONSE = ( '{"response":[{"first_name":"Павел","id":1,"last_name":"Дуров",' '"can_access_closed":true,"is_closed":false}]}' ) ctx...
self.recent_response
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_api.py
test_api_invalid_response
assert
collection
20
from typing import Any import pytest from tests.test_utils import with_mocked_api from vkbottle import API, ABCRequestRescheduler, CaptchaError, CtxStorage, VKAPIError USERS_GET_RESPONSE = ( '{"response":[{"first_name":"Павел","id":1,"last_name":"Дуров",' '"can_access_closed":true,"is_closed":false}]}' ) ctx...
{"response": {"some": "response"}}
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
message_handler
assert
numeric_literal
81
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
1
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
test_rules
assert
collection
171
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
{}
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
message_handler
assert
numeric_literal
80
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
100
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
test_rules
assert
bool_literal
165
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
True
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
test_rules
assert
bool_literal
118
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
False
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
wall_post_handler
assert
numeric_literal
80
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
-123456
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
wall_post_handler
assert
complex_expr
81
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
bot.api
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
test_bot_scopes
assert
string_literal
81
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
"some token"
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
test_bot_scopes
assert
complex_expr
82
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
bot.polling.api
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
test_states
assert
complex_expr
98
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
FirstMockState.MOCK
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
test_states
assert
complex_expr
96
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
SecondMockState.MOCK
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
test_states
assert
string_literal
100
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
"FirstMockState:mock"
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
test_states
assert
string_literal
99
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
"SecondMockState:mock"
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
test_bot_scopes
assert
complex_expr
84
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
bot.router.views["raw"]
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
test_states
assert
complex_expr
97
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
second_mock_state.state
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
test_bot_scopes
assert
complex_expr
83
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
bot.router.views["message"]
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
message_handler
assert
collection
82
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
{ "peer_ids": str(message.peer_id), "r": 1, "random_id": 0, }
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_bot.py
message_handler
assert
collection
87
import json from typing import Any, Callable import pytest import vbml from vkbottle_types.methods.base_category import BaseCategory from tests.test_utils import MockedClient, with_mocked_api from vkbottle import ( API, AndRule, BaseStateGroup, Bot, GroupEventType, GroupTypes, NotRule, ...
{ "peer_ids": str(message.peer_id), "random_id": 0, "some_unsigned_param": "test", "r": 1, }
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_event_data.py
test_event_data_export
assert
string_literal
13
from vkbottle import OpenAppEvent, OpenLinkEvent, ShowSnackbarEvent def test_event_data_export(): some_str = "vkbottle" some_int = 1_054_204 assert ( ShowSnackbarEvent(text=some_str).json() == f'{{"type": "show_snackbar", "text": "{some_str}"}}' ) assert OpenLinkEvent(link=some_s...
f'{{"type": "open_link", "link": "{some_str}"}}'
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_event_data.py
test_event_data_export
assert
string_literal
8
from vkbottle import OpenAppEvent, OpenLinkEvent, ShowSnackbarEvent def test_event_data_export(): some_str = "vkbottle" some_int = 1_054_204 assert
f'{{"type": "show_snackbar", "text": "{some_str}"}}'
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_event_data.py
test_event_data_export
assert
string_literal
15
from vkbottle import OpenAppEvent, OpenLinkEvent, ShowSnackbarEvent def test_event_data_export(): some_str = "vkbottle" some_int = 1_054_204 assert ( ShowSnackbarEvent(text=some_str).json() == f'{{"type": "show_snackbar", "text": "{some_str}"}}' ) assert OpenLinkEvent(link=some_st...
f'{{"type": "open_app", "owner_id": null, "app_id": {some_int}, "hash": "{some_str}"}}'
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_exception_handling.py
test_code_error
assert
numeric_literal
17
import pytest from vkbottle import CodeException, ErrorHandler def test_code_error(): class CodeError(CodeException): pass try: raise CodeError[1]() except CodeError[2] as e: raise AssertionError() from e except CodeError[3, 4] as e: raise AssertionError() from e e...
1
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_exception_handling.py
test_error_handler
assert
numeric_literal
21
import pytest from vkbottle import CodeException, ErrorHandler @pytest.mark.asyncio async def test_error_handler(): class Base(Exception): pass class Derived(Base): pass error_handler = ErrorHandler() @error_handler.register_error_handler(Base) async def handler(error: Exception...
42
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_exception_manager.py
test_code_exception
assert
numeric_literal
15
from vkbottle import CodeException def test_code_exception(): class CodeError(CodeException): pass try: raise CodeError[1]() except CodeError[2] as e: raise AssertionError() from e except CodeError[3, 4] as e: raise AssertionError() from e except CodeError[1, 2, 5] ...
1
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_http.py
test_client_init
assert
string_literal
10
import pytest from tests.test_utils import MockedClient from vkbottle.http import AiohttpClient, SingleAiohttpClient @pytest.mark.asyncio async def test_client_init(): client = AiohttpClient(test="test") assert client._session_params["test"] ==
"test"
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_http.py
test_client
assert
string_literal
12
import pytest from tests.test_utils import MockedClient from vkbottle.http import AiohttpClient, SingleAiohttpClient @pytest.mark.asyncio async def test_client(): client = MockedClient("some text") text = await client.request_text("https://example.com") await client.close() assert text ==
"some text"
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_middlewares.py
test_middleware_send
assert
none_literal
11
import pytest from vkbottle.dispatch.middlewares.abc import BaseMiddleware, MiddlewareError from vkbottle.dispatch.views.bot.message import BotMessageView def test_middleware_send(empty_middleware_instance: BaseMiddleware): with pytest.raises(ValueError): empty_middleware_instance.send("not_a_dict") # ty...
None
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_middlewares.py
test_cant_forward_on_error
assert
bool_literal
16
import pytest from vkbottle.dispatch.middlewares.abc import BaseMiddleware, MiddlewareError from vkbottle.dispatch.views.bot.message import BotMessageView @pytest.mark.asyncio async def test_cant_forward_on_error(empty_middleware_class, empty_event): class SomeMiddleware(empty_middleware_class): async def...
False
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_middlewares.py
test_middleware_send
pytest.raises
variable
8
import pytest from vkbottle.dispatch.middlewares.abc import BaseMiddleware, MiddlewareError from vkbottle.dispatch.views.bot.message import BotMessageView def test_middleware_send(empty_middleware_instance: BaseMiddleware): with pytest.raises(
ValueError)
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_middlewares.py
test_middleware_stop
pytest.raises
variable
8
import pytest from vkbottle.dispatch.middlewares.abc import BaseMiddleware, MiddlewareError from vkbottle.dispatch.views.bot.message import BotMessageView def test_middleware_stop(empty_middleware_instance: BaseMiddleware): with pytest.raises(
MiddlewareError)
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_middlewares.py
test_raise_in_pre_sets_error
assert
variable
21
import pytest from vkbottle.dispatch.middlewares.abc import BaseMiddleware, MiddlewareError from vkbottle.dispatch.views.bot.message import BotMessageView @pytest.mark.asyncio async def test_raise_in_pre_sets_error(empty_middleware_class, empty_event): expected_Exception = Exception("some_exception") class S...
expected_Exception
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_views.py
test_pre_post_middleware_returns_exception
assert
none_literal
22
import pytest from vkbottle import ABCView from vkbottle.dispatch.middlewares.abc import BaseMiddleware @pytest.mark.asyncio async def test_pre_post_middleware_returns_exception(empty_event): expected_error = Exception() def construct_exception_middleware(event, view=None): instance = BaseMiddleware(...
None
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_views.py
test_pre_post_middleware_returns_exception
assert
bool_literal
18
import pytest from vkbottle import ABCView from vkbottle.dispatch.middlewares.abc import BaseMiddleware @pytest.mark.asyncio async def test_pre_post_middleware_returns_exception(empty_event): expected_error = Exception() def construct_exception_middleware(event, view=None): instance = BaseMiddleware(...
False
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/test_views.py
test_pre_post_middleware_returns_exception
assert
variable
17
import pytest from vkbottle import ABCView from vkbottle.dispatch.middlewares.abc import BaseMiddleware @pytest.mark.asyncio async def test_pre_post_middleware_returns_exception(empty_event): expected_error = Exception() def construct_exception_middleware(event, view=None): instance = BaseMiddleware(...
expected_error
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/tools/test_tools.py
test_run_multibot
assert
numeric_literal
89
import asyncio import os from io import StringIO import pytest from pytest_mock import MockerFixture from vkbottle import API from vkbottle.bot import Bot, run_multibot from vkbottle.dispatch import ABCRule, AndRule, NotRule, OrRule from vkbottle.modules import json from vkbottle.tools import ( CallableValidator,...
3
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/tools/test_tools.py
assert_rule
assert
variable
76
import asyncio import os from io import StringIO import pytest from pytest_mock import MockerFixture from vkbottle import API from vkbottle.bot import Bot, run_multibot from vkbottle.dispatch import ABCRule, AndRule, NotRule, OrRule from vkbottle.modules import json from vkbottle.tools import ( CallableValidator,...
rev
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/tools/test_tools.py
test_utils
assert_*
bool_literal
99
import asyncio import os from io import StringIO import pytest from pytest_mock import MockerFixture from vkbottle import API from vkbottle.bot import Bot, run_multibot from vkbottle.dispatch import ABCRule, AndRule, NotRule, OrRule from vkbottle.modules import json from vkbottle.tools import ( CallableValidator,...
True)
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/tools/test_tools.py
test_keyboard_non_builder
assert
variable
85
import asyncio import os from io import StringIO import pytest from pytest_mock import MockerFixture from vkbottle import API from vkbottle.bot import Bot, run_multibot from vkbottle.dispatch import ABCRule, AndRule, NotRule, OrRule from vkbottle.modules import json from vkbottle.tools import ( CallableValidator,...
KEYBOARD_JSON
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/tools/test_tools.py
test_template_generator
assert
variable
79
import asyncio import os from io import StringIO import pytest from pytest_mock import MockerFixture from vkbottle import API from vkbottle.bot import Bot, run_multibot from vkbottle.dispatch import ABCRule, AndRule, NotRule, OrRule from vkbottle.modules import json from vkbottle.tools import ( CallableValidator,...
TEMPLATE_DICT
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/tools/test_tools.py
test_utils
assert
string_literal
88
import asyncio import os from io import StringIO import pytest from pytest_mock import MockerFixture from vkbottle import API from vkbottle.bot import Bot, run_multibot from vkbottle.dispatch import ABCRule, AndRule, NotRule, OrRule from vkbottle.modules import json from vkbottle.tools import ( CallableValidator,...
"task_to_run"
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/tools/test_tools.py
test_loop_wrapper
assert
complex_expr
96
import asyncio import os from io import StringIO import pytest from pytest_mock import MockerFixture from vkbottle import API from vkbottle.bot import Bot, run_multibot from vkbottle.dispatch import ABCRule, AndRule, NotRule, OrRule from vkbottle.modules import json from vkbottle.tools import ( CallableValidator,...
task1.__name__
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/tools/test_tools.py
test_utils
assert_*
func_call
102
import asyncio import os from io import StringIO import pytest from pytest_mock import MockerFixture from vkbottle import API from vkbottle.bot import Bot, run_multibot from vkbottle.dispatch import ABCRule, AndRule, NotRule, OrRule from vkbottle.modules import json from vkbottle.tools import ( CallableValidator,...
await (~c_rule(1)).check(2))
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/tools/test_tools.py
test_loop_wrapper
assert
collection
97
import asyncio import os from io import StringIO import pytest from pytest_mock import MockerFixture from vkbottle import API from vkbottle.bot import Bot, run_multibot from vkbottle.dispatch import ABCRule, AndRule, NotRule, OrRule from vkbottle.modules import json from vkbottle.tools import ( CallableValidator,...
[ task2.__name__, task3.__name__, ]
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/tools/test_vkscript_converter.py
test_vkscript
assert
func_call
43
from vkbottle import vkscript BASIC_CYCLE = "var a=%A%;var some_list=[];while(a<100){API.users.get({user_id:a});a = a + 1;some_list.push(a);};return some_list;" API_REQUEST = "var group_id=%A%;return API.groups.getById({group_id:group_id});" def basic_cycle(api, a: int = 10): some_list = [] while a < 100: ...
API_REQUEST.replace("%A%", "1")
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/tools/test_vkscript_converter.py
test_vkscript
assert
func_call
41
from vkbottle import vkscript BASIC_CYCLE = "var a=%A%;var some_list=[];while(a<100){API.users.get({user_id:a});a = a + 1;some_list.push(a);};return some_list;" API_REQUEST = "var group_id=%A%;return API.groups.getById({group_id:group_id});" def basic_cycle(api, a: int = 10): some_list = [] while a < 100: ...
BASIC_CYCLE.replace("%A%", "10")
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vkbottle/vkbottle
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
train
train
tests/tools/test_vkscript_converter.py
test_vkscript
assert
func_call
42
from vkbottle import vkscript BASIC_CYCLE = "var a=%A%;var some_list=[];while(a<100){API.users.get({user_id:a});a = a + 1;some_list.push(a);};return some_list;" API_REQUEST = "var group_id=%A%;return API.groups.getById({group_id:group_id});" def basic_cycle(api, a: int = 10): some_list = [] while a < 100: ...
BASIC_CYCLE.replace("%A%", "94")
5aa8464363d5ca08dbc98eb0c8054d4e00736fbb
59
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_advanced_security_scenarios.py
test_python_code_injection_via_eval
assert
numeric_literal
406
from dataclasses import dataclass from typing import Any import pytest from llm_sandbox import SandboxSession from llm_sandbox.security import RestrictedModule, SecurityIssueSeverity, SecurityPattern, SecurityPolicy pytestmark = pytest.mark.usefixtures("mock_docker_backend") def comprehensive_security_policy() -> S...
1
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_base_handler.py
test_plot_detection_config
assert
numeric_literal
23
import base64 import io import logging import tarfile from unittest.mock import Mock, patch import pytest from llm_sandbox.data import FileType from llm_sandbox.exceptions import CommandFailedError, PackageManagerError from llm_sandbox.language_handlers.base import AbstractLanguageHandler, LanguageConfig, PlotDetecti...
1
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_const.py
test_backend_iteration
assert
numeric_literal
11
import pytest from llm_sandbox.const import DefaultImage, SandboxBackend, StrEnum, SupportedLanguage class TestSandboxBackend: def test_backend_iteration(self) -> None: """Test iterating over backends.""" backends = list(SandboxBackend) assert len(backends) ==
4
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_const.py
test_language_iteration
assert
numeric_literal
11
import pytest from llm_sandbox.const import DefaultImage, SandboxBackend, StrEnum, SupportedLanguage class TestSupportedLanguage: def test_language_iteration(self) -> None: """Test iterating over languages.""" languages = list(SupportedLanguage) assert len(languages) ==
7
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_cpp_handler.py
test_get_execution_commands
assert
numeric_literal
18
import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.cpp_handler import CppHandler class TestCppHandler: def test_get_execution_commands(self) -> None: """Test getting execution commands.""" handler = CppHa...
2
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_custom_image_libraries.py
test_custom_image_with_preinstalled_libraries
assert
numeric_literal
67
from unittest.mock import MagicMock, patch from llm_sandbox import SandboxSession from llm_sandbox.data import ConsoleOutput class TestCustomImageLibraries: @patch("llm_sandbox.docker.docker.from_env") @patch("llm_sandbox.language_handlers.factory.LanguageHandlerFactory.create_handler") def test_custom_i...
0
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_custom_image_libraries.py
test_libraries_parameter_still_works_with_custom_image
assert
numeric_literal
67
from unittest.mock import MagicMock, patch from llm_sandbox import SandboxSession from llm_sandbox.data import ConsoleOutput class TestCustomImageLibraries: @patch("llm_sandbox.docker.docker.from_env") @patch("llm_sandbox.language_handlers.factory.LanguageHandlerFactory.create_handler") def test_librarie...
1
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_data.py
test_console_output_creation
assert
numeric_literal
28
from dataclasses import FrozenInstanceError import pytest from llm_sandbox.data import ConsoleOutput, ExecutionResult, FileType, PlotOutput from llm_sandbox.exceptions import ( CommandEmptyError, CommandFailedError, ExtraArgumentsError, ImageNotFoundError, ImagePullError, LanguageHandlerNotIni...
0
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_data.py
test_console_output_with_error
assert
numeric_literal
28
from dataclasses import FrozenInstanceError import pytest from llm_sandbox.data import ConsoleOutput, ExecutionResult, FileType, PlotOutput from llm_sandbox.exceptions import ( CommandEmptyError, CommandFailedError, ExtraArgumentsError, ImageNotFoundError, ImagePullError, LanguageHandlerNotIni...
1
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_data.py
test_execution_result_with_plots
assert
numeric_literal
34
from dataclasses import FrozenInstanceError import pytest from llm_sandbox.data import ConsoleOutput, ExecutionResult, FileType, PlotOutput from llm_sandbox.exceptions import ( CommandEmptyError, CommandFailedError, ExtraArgumentsError, ImageNotFoundError, ImagePullError, LanguageHandlerNotIni...
2
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_data_missing.py
test_console_output_defaults
assert
numeric_literal
12
import warnings from llm_sandbox.data import ConsoleOutput, ExecutionResult, FileType, PlotOutput class TestDataClassDefaults: def test_console_output_defaults(self) -> None: """Test ConsoleOutput with default values.""" # Test with all defaults output = ConsoleOutput() assert ou...
0
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_data_missing.py
test_console_output_defaults
assert
numeric_literal
19
import warnings from llm_sandbox.data import ConsoleOutput, ExecutionResult, FileType, PlotOutput class TestDataClassDefaults: def test_console_output_defaults(self) -> None: """Test ConsoleOutput with default values.""" # Test with all defaults output = ConsoleOutput() assert out...
1
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_docker.py
test_execute_command_success_no_stream
assert
numeric_literal
37
import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from docker.errors import ImageNotFound, NotFound from pydantic_core import ValidationError from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbox.data ...
0
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_docker.py
test_execute_command_no_workdir
assert
numeric_literal
30
import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from docker.errors import ImageNotFound, NotFound from pydantic_core import ValidationError from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbox.data ...
1
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_docker.py
test_init_with_deprecated_mounts_and_existing_runtime_mounts
assert
numeric_literal
36
import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from docker.errors import ImageNotFound, NotFound from pydantic_core import ValidationError from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbox.data ...
2
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_dynamic_paths.py
test_execution_commands_with_context_default_workdir
assert
numeric_literal
18
from llm_sandbox.language_handlers.cpp_handler import CppHandler from llm_sandbox.language_handlers.python_handler import PythonHandler from llm_sandbox.language_handlers.runtime_context import RuntimeContext class TestPythonHandlerDynamicPaths: def test_execution_commands_with_context_default_workdir(self) -> No...
1
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_dynamic_paths.py
test_execution_commands_with_context_default_workdir
assert
numeric_literal
15
from llm_sandbox.language_handlers.cpp_handler import CppHandler from llm_sandbox.language_handlers.python_handler import PythonHandler from llm_sandbox.language_handlers.runtime_context import RuntimeContext class TestCppHandlerDynamicPaths: def test_execution_commands_with_context_default_workdir(self) -> None:...
2
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_exceptions.py
test_exception_instantiation
assert
numeric_literal
39
from llm_sandbox.exceptions import ( CommandEmptyError, CommandFailedError, ContainerError, ExtraArgumentsError, ImageNotFoundError, ImagePullError, InvalidRegexPatternError, LanguageHandlerNotInitializedError, LanguageNotSupportedError, LanguageNotSupportPlotError, LibraryIn...
0
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor