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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aimagelab/mammoth | 66686e273717f24540e60776bf119a0dc3bf340f | 10 | train | train | tests/test_scheduler.py | test_der_cifar100_customscheduler | assert | collection | 56 | import os
import sys
import torch
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from main import main
def test_der_cifar100_customscheduler(capsys):
N_TASKS = 10
sys.argv = ['mammoth',
'--model',
'der',
'--dataset',
... | [0.1] | 66686e273717f24540e60776bf119a0dc3bf340f | 10 | v2_extractor_at_anchor |
aimagelab/mammoth | 66686e273717f24540e60776bf119a0dc3bf340f | 10 | train | train | tests/test_scheduler.py | test_der_cifar100_defaultscheduler | assert | collection | 54 | import os
import sys
import torch
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from main import main
def test_der_cifar100_defaultscheduler(capsys):
N_TASKS = 10
sys.argv = ['mammoth',
'--model',
'der',
'--dataset',
... | [0.03] | 66686e273717f24540e60776bf119a0dc3bf340f | 10 | v2_extractor_at_anchor |
aimagelab/mammoth | 66686e273717f24540e60776bf119a0dc3bf340f | 10 | train | train | tests/test_scheduler.py | test_der_cifar100_defaultscheduler | assert | collection | 53 | import os
import sys
import torch
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from main import main
def test_der_cifar100_defaultscheduler(capsys):
N_TASKS = 10
sys.argv = ['mammoth',
'--model',
'der',
'--dataset',
... | [35, 45] | 66686e273717f24540e60776bf119a0dc3bf340f | 10 | v2_extractor_at_anchor |
aimagelab/mammoth | 66686e273717f24540e60776bf119a0dc3bf340f | 10 | train | train | tests/test_scheduler.py | test_der_cifar100_customscheduler | assert | collection | 55 | import os
import sys
import torch
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from main import main
def test_der_cifar100_customscheduler(capsys):
N_TASKS = 10
sys.argv = ['mammoth',
'--model',
'der',
'--dataset',
... | [2, 4, 6, 8] | 66686e273717f24540e60776bf119a0dc3bf340f | 10 | v2_extractor_at_anchor |
aimagelab/mammoth | 66686e273717f24540e60776bf119a0dc3bf340f | 10 | train | train | tests/test_scheduler.py | test_der_cifar100_defaultscheduler | assert | complex_expr | 52 | import os
import sys
import torch
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from main import main
def test_der_cifar100_defaultscheduler(capsys):
N_TASKS = 10
sys.argv = ['mammoth',
'--model',
'der',
'--dataset',
... | opt['initial_lr'] * 0.1 * 0.1 | 66686e273717f24540e60776bf119a0dc3bf340f | 10 | v2_extractor_at_anchor |
aimagelab/mammoth | 66686e273717f24540e60776bf119a0dc3bf340f | 10 | train | train | tests/test_scheduler.py | test_der_cifar100_customscheduler | assert | complex_expr | 54 | import os
import sys
import torch
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from main import main
def test_der_cifar100_customscheduler(capsys):
N_TASKS = 10
sys.argv = ['mammoth',
'--model',
'der',
'--dataset',
... | opt['initial_lr'] * 0.1 * 0.1 * 0.1 * 0.1 | 66686e273717f24540e60776bf119a0dc3bf340f | 10 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | examples/example_pool.py | test_example | assert | numeric_literal | 14 | import asyncio
import aiomysql
async def test_example(loop):
pool = await aiomysql.create_pool(host='127.0.0.1', port=3306,
user='root', password='',
db='mysql', loop=loop)
async with pool.acquire() as conn:
async with conn.cur... | 42 | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | examples/example_pool_oldstyle.py | test_example | assert | numeric_literal | 17 | import asyncio
import aiomysql
loop = asyncio.get_event_loop()
@asyncio.coroutine
def test_example():
pool = yield from aiomysql.create_pool(host='127.0.0.1', port=3306,
user='root', password='',
db='mysql', loop=loo... | 10 | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/conftest.py | mysql_server | assert | string_literal | 257 | import asyncio
import gc
import os
import ssl
import socket
import sys
import time
import uuid
from docker import APIClient
import aiomysql
import pymysql
import pytest
PY_35 = sys.version_info >= (3, 5)
def unused_port():
def f():
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
... | "YES" | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_compiled_cache.py | go | self.assertEqual | complex_expr | 64 | import asyncio
from aiomysql import sa
from sqlalchemy import bindparam
import os
import unittest
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('sa_tbl_cache_test', meta,
Column('id', Integer, nullable=False,
primary_key=True),
... | row.val) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_connection.py | go | self.assertEqual | variable | 58 | import asyncio
import aiomysql
from aiomysql import connect, sa, Cursor
import os
import unittest
from unittest import mock
from sqlalchemy import MetaData, Table, Column, Integer, String
from sqlalchemy.schema import DropTable, CreateTable
from sqlalchemy.sql.expression import bindparam
meta = MetaData()
tbl = Tabl... | res) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_connection.py | go | self.assertIn | variable | 63 | import asyncio
import aiomysql
from aiomysql import connect, sa, Cursor
import os
import unittest
from unittest import mock
from sqlalchemy import MetaData, Table, Column, Integer, String
from sqlalchemy.schema import DropTable, CreateTable
from sqlalchemy.sql.expression import bindparam
meta = MetaData()
tbl = Tabl... | row) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_distil.py | test_distill_none | self.assertEqual | collection | 9 | import unittest
import sqlalchemy
from aiomysql.sa.connection import _distill_params
class DistillArgsTest(unittest.TestCase):
def test_distill_none(self):
self | []) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_distil.py | test_distill_single_string | self.assertEqual | collection | 10 | import unittest
import sqlalchemy
from aiomysql.sa.connection import _distill_params
class DistillArgsTest(unittest.TestCase):
def test_distill_single_string(self):
self | [["arg"]]) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_distil.py | test_distill_dict_multi_none_param | self.assertEqual | collection | 10 | import unittest
import sqlalchemy
from aiomysql.sa.connection import _distill_params
class DistillArgsTest(unittest.TestCase):
def test_distill_dict_multi_none_param(self):
self | [{"foo": "bar"}]) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_distil.py | test_distill_single_list_strings | self.assertEqual | collection | 10 | import unittest
import sqlalchemy
from aiomysql.sa.connection import _distill_params
class DistillArgsTest(unittest.TestCase):
def test_distill_single_list_strings(self):
self | [["foo", "bar"]]) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_distil.py | test_distill_single_list_tuple | self.assertEqual | collection | 10 | import unittest
import sqlalchemy
from aiomysql.sa.connection import _distill_params
class DistillArgsTest(unittest.TestCase):
def test_distill_single_list_tuple(self):
self | [('foo', 'bar')]) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_distil.py | test_distill_multi_string_tuple | self.assertEqual | collection | 10 | import unittest
import sqlalchemy
from aiomysql.sa.connection import _distill_params
class DistillArgsTest(unittest.TestCase):
def test_distill_multi_string_tuple(self):
self | [("arg", "arg")]) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_distil.py | test_distill_single_list_tuples | self.assertEqual | collection | 10 | import unittest
import sqlalchemy
from aiomysql.sa.connection import _distill_params
class DistillArgsTest(unittest.TestCase):
def test_distill_single_list_tuples(self):
self | [('foo', 'bar'), ('bat', 'hoho')]) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_distil.py | test_distill_single_list_dicts | self.assertEqual | collection | 10 | import unittest
import sqlalchemy
from aiomysql.sa.connection import _distill_params
class DistillArgsTest(unittest.TestCase):
def test_distill_single_list_dicts(self):
self | [{'foo': 'bar'}, {'foo': 'hoho'}]) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_distil.py | test_distill_multi_list_tuple | self.assertEqual | collection | 10 | import unittest
import sqlalchemy
from aiomysql.sa.connection import _distill_params
class DistillArgsTest(unittest.TestCase):
def test_distill_multi_list_tuple(self):
self | ([('foo', 'bar')], [('bar', 'bat')])) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_engine.py | go | self.assertEqual | variable | 80 | import asyncio
from aiomysql import sa
import os
import unittest
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('sa_tbl3', meta,
Column('id', Integer, nullable=False,
primary_key=True),
Column('name', String(255)))
class TestE... | ops) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_engine.py | go | self.assertEqual | complex_expr | 63 | import asyncio
from aiomysql import sa
import os
import unittest
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('sa_tbl3', meta,
Column('id', Integer, nullable=False,
primary_key=True),
Column('name', String(255)))
class TestE... | engine.size) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_engine.py | go | self.assertTrue | complex_expr | 64 | import asyncio
from aiomysql import sa
import os
import unittest
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('sa_tbl3', meta,
Column('id', Integer, nullable=False,
primary_key=True),
Column('name', String(255)))
class TestE... | conn.closed) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_engine.py | go | self.assertRaises | variable | 59 | import asyncio
from aiomysql import sa
import os
import unittest
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('sa_tbl3', meta,
Column('id', Integer, nullable=False,
primary_key=True),
Column('name', String(255)))
class TestE... | RuntimeError) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_engine.py | test_name | self.assertEqual | complex_expr | 59 | import asyncio
from aiomysql import sa
import os
import unittest
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('sa_tbl3', meta,
Column('id', Integer, nullable=False,
primary_key=True),
Column('name', String(255)))
class TestE... | self.engine.name) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_engine.py | test_size | self.assertEqual | complex_expr | 59 | import asyncio
from aiomysql import sa
import os
import unittest
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('sa_tbl3', meta,
Column('id', Integer, nullable=False,
primary_key=True),
Column('name', String(255)))
class TestE... | self.engine.size) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_engine.py | test_driver | self.assertEqual | complex_expr | 59 | import asyncio
from aiomysql import sa
import os
import unittest
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('sa_tbl3', meta,
Column('id', Integer, nullable=False,
primary_key=True),
Column('name', String(255)))
class TestE... | self.engine.driver) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_engine.py | test_dialect | self.assertEqual | complex_expr | 59 | import asyncio
from aiomysql import sa
import os
import unittest
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('sa_tbl3', meta,
Column('id', Integer, nullable=False,
primary_key=True),
Column('name', String(255)))
class TestE... | self.engine.dialect) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_engine.py | test_minsize | self.assertEqual | complex_expr | 59 | import asyncio
from aiomysql import sa
import os
import unittest
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('sa_tbl3', meta,
Column('id', Integer, nullable=False,
primary_key=True),
Column('name', String(255)))
class TestE... | self.engine.minsize) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_engine.py | test_maxsize | self.assertEqual | complex_expr | 59 | import asyncio
from aiomysql import sa
import os
import unittest
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('sa_tbl3', meta,
Column('id', Integer, nullable=False,
primary_key=True),
Column('name', String(255)))
class TestE... | self.engine.maxsize) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_engine.py | test_freesize | self.assertEqual | complex_expr | 59 | import asyncio
from aiomysql import sa
import os
import unittest
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('sa_tbl3', meta,
Column('id', Integer, nullable=False,
primary_key=True),
Column('name', String(255)))
class TestE... | self.engine.freesize) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_transaction.py | go | self.assertEqual | variable | 85 | import asyncio
from aiomysql import connect, sa
import functools
import os
import unittest
from unittest import mock
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('sa_tbl2', meta,
Column('id', Integer, nullable=False,
primary_key=True),
... | res) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/sa/test_sa_types.py | go | self.assertEqual | complex_expr | 53 | import asyncio
from aiomysql import connect, sa
from enum import IntEnum
import os
import unittest
from unittest import mock
from sqlalchemy import MetaData, Table, Column, Integer, TypeDecorator
class TestSATypes(unittest.TestCase):
def setUp(self):
self.loop = asyncio.new_event_loop()
asyncio.s... | UserDefinedEnum.Value1) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_async_iter.py | test_async_cursor | assert | variable | 39 | import pytest
from aiomysql import SSCursor
from aiomysql import sa
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('tbl', meta,
Column('id', Integer, nullable=False, primary_key=True),
Column('name', String(255)))
def table(loop, connection_crea... | ret | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_async_with.py | test_transaction_context_manager | assert | numeric_literal | 52 | import warnings
import aiomysql
import pytest
from aiomysql import sa, create_pool, DictCursor
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('tbl', meta,
Column('id', Integer, nullable=False, primary_key=True),
Column('name', String(255)))
def ... | 1 | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_async_with.py | test_cursor | assert | variable | 44 | import warnings
import aiomysql
import pytest
from aiomysql import sa, create_pool, DictCursor
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('tbl', meta,
Column('id', Integer, nullable=False, primary_key=True),
Column('name', String(255)))
def ... | ret | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_async_with.py | test_incompatible_cursor_fails | assert | variable | 41 | import warnings
import aiomysql
import pytest
from aiomysql import sa, create_pool, DictCursor
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('tbl', meta,
Column('id', Integer, nullable=False, primary_key=True),
Column('name', String(255)))
def ... | msg | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_async_with.py | test_sa_transaction | assert | variable | 39 | import warnings
import aiomysql
import pytest
from aiomysql import sa, create_pool, DictCursor
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('tbl', meta,
Column('id', Integer, nullable=False, primary_key=True),
Column('name', String(255)))
def ... | cnt | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_async_with.py | test_cursor_method | assert | collection | 39 | import warnings
import aiomysql
import pytest
from aiomysql import sa, create_pool, DictCursor
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('tbl', meta,
Column('id', Integer, nullable=False, primary_key=True),
Column('name', String(255)))
def ... | (42,) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_async_with.py | test_connection_exception | assert | string_literal | 41 | import warnings
import aiomysql
import pytest
from aiomysql import sa, create_pool, DictCursor
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('tbl', meta,
Column('id', Integer, nullable=False, primary_key=True),
Column('name', String(255)))
def ... | 'boom' | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_async_with.py | test_sa_transaction_rollback | assert | string_literal | 46 | import warnings
import aiomysql
import pytest
from aiomysql import sa, create_pool, DictCursor
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('tbl', meta,
Column('id', Integer, nullable=False, primary_key=True),
Column('name', String(255)))
def ... | "Exit" | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_async_with.py | test_connection_exception | pytest.raises | variable | 37 | import warnings
import aiomysql
import pytest
from aiomysql import sa, create_pool, DictCursor
from sqlalchemy import MetaData, Table, Column, Integer, String
meta = MetaData()
tbl = Table('tbl', meta,
Column('id', Integer, nullable=False, primary_key=True),
Column('name', String(255)))
def ... | RuntimeError) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_basic.py | test_datatypes_nulls | assert | variable | 31 | import datetime
import json
import re
import time
import pytest
from pymysql import util
from pymysql.err import ProgrammingError
def datatype_table(loop, cursor, table_cleanup):
async def f():
await cursor.execute(
"CREATE TABLE test_datatypes (b bit, i int, l bigint, f real, s "
... | r | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_basic.py | test_get_transaction_status | assert | numeric_literal | 35 | import datetime
import json
import re
import time
import pytest
from pymysql import util
from pymysql.err import ProgrammingError
def datatype_table(loop, cursor, table_cleanup):
async def f():
await cursor.execute(
"CREATE TABLE test_datatypes (b bit, i int, l bigint, f real, s "
... | 1 | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_basic.py | test_rollback | assert | numeric_literal | 42 | import datetime
import json
import re
import time
import pytest
from pymysql import util
from pymysql.err import ProgrammingError
def datatype_table(loop, cursor, table_cleanup):
async def f():
await cursor.execute(
"CREATE TABLE test_datatypes (b bit, i int, l bigint, f real, s "
... | 0 | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_basic.py | test_datatypes | assert | complex_expr | 43 | import datetime
import json
import re
import time
import pytest
from pymysql import util
from pymysql.err import ProgrammingError
def datatype_table(loop, cursor, table_cleanup):
async def f():
await cursor.execute(
"CREATE TABLE test_datatypes (b bit, i int, l bigint, f real, s "
... | r[0] | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_basic.py | test_datatypes | assert | complex_expr | 53 | import datetime
import json
import re
import time
import pytest
from pymysql import util
from pymysql.err import ProgrammingError
def datatype_table(loop, cursor, table_cleanup):
async def f():
await cursor.execute(
"CREATE TABLE test_datatypes (b bit, i int, l bigint, f real, s "
... | r[10] | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_basic.py | test_datatypes | assert | complex_expr | 54 | import datetime
import json
import re
import time
import pytest
from pymysql import util
from pymysql.err import ProgrammingError
def datatype_table(loop, cursor, table_cleanup):
async def f():
await cursor.execute(
"CREATE TABLE test_datatypes (b bit, i int, l bigint, f real, s "
... | r[-1] | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_basic.py | test_datatypes | assert | complex_expr | 45 | import datetime
import json
import re
import time
import pytest
from pymysql import util
from pymysql.err import ProgrammingError
def datatype_table(loop, cursor, table_cleanup):
async def f():
await cursor.execute(
"CREATE TABLE test_datatypes (b bit, i int, l bigint, f real, s "
... | r[1:9] | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_basic.py | test_json | assert | func_call | 57 | import datetime
import json
import re
import time
import pytest
from pymysql import util
from pymysql.err import ProgrammingError
def datatype_table(loop, cursor, table_cleanup):
async def f():
await cursor.execute(
"CREATE TABLE test_datatypes (b bit, i int, l bigint, f real, s "
... | json.loads(json_str) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_bulk_inserts.py | test_bulk_insert | assert_* | variable | 45 | import pytest
from aiomysql import DictCursor
def table(loop, connection, table_cleanup):
async def f():
cursor = await connection.cursor(DictCursor)
sql = """CREATE TABLE bulkinsert (id INT(11), name CHAR(20),
age INT, height INT, PRIMARY KEY (id))"""
await cursor.execute(... | data) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_bulk_inserts.py | test_bulk_insert | assert | variable | 43 | import pytest
from aiomysql import DictCursor
def table(loop, connection, table_cleanup):
async def f():
cursor = await connection.cursor(DictCursor)
sql = """CREATE TABLE bulkinsert (id INT(11), name CHAR(20),
age INT, height INT, PRIMARY KEY (id))"""
await cursor.execute(... | expected | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_bulk_inserts.py | f | assert | func_call | 19 | import pytest
from aiomysql import DictCursor
def table(loop, connection, table_cleanup):
async def f():
cursor = await connection.cursor(DictCursor)
sql = """CREATE TABLE bulkinsert (id INT(11), name CHAR(20),
age INT, height INT, PRIMARY KEY (id))"""
await cursor.execute(... | sorted(result) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_bulk_inserts.py | test_bulk_replace | assert_* | collection | 45 | import pytest
from aiomysql import DictCursor
def table(loop, connection, table_cleanup):
async def f():
cursor = await connection.cursor(DictCursor)
sql = """CREATE TABLE bulkinsert (id INT(11), name CHAR(20),
age INT, height INT, PRIMARY KEY (id))"""
await cursor.execute(... | [(0, "jim", 56, 45)]) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_bulk_inserts.py | f | assert | func_call | 29 | import pytest
from aiomysql import DictCursor
def table(loop, connection, table_cleanup):
async def f():
cursor = await connection.cursor(DictCursor)
sql = """CREATE TABLE bulkinsert (id INT(11), name CHAR(20),
age INT, height INT, PRIMARY KEY (id))"""
await cursor.execute(... | sorted(result, key=lambda k: k['id']) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_bulk_inserts.py | test_bulk_replace | assert | func_call | 40 | import pytest
from aiomysql import DictCursor
def table(loop, connection, table_cleanup):
async def f():
cursor = await connection.cursor(DictCursor)
sql = """CREATE TABLE bulkinsert (id INT(11), name CHAR(20),
age INT, height INT, PRIMARY KEY (id))"""
await cursor.execute(... | bytearray( b"REPLACE INTO bulkinsert (id, name, age, height) " + b"VALUES (0,'bob',21,123),(0,'jim',56,45)" ) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_bulk_inserts.py | test_bulk_insert_multiline_statement | assert | func_call | 44 | import pytest
from aiomysql import DictCursor
def table(loop, connection, table_cleanup):
async def f():
cursor = await connection.cursor(DictCursor)
sql = """CREATE TABLE bulkinsert (id INT(11), name CHAR(20),
age INT, height INT, PRIMARY KEY (id))"""
await cursor.execute(... | bytearray(b"""insert into bulkinsert (id, name, age, height) values (0, 'bob' , 21, 123 ),(1, 'jim' , 56, 45 ),(2, 'fred' , 100, 180 )""") | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_bulk_inserts.py | test_insert_on_duplicate_key_update | assert | func_call | 46 | import pytest
from aiomysql import DictCursor
def table(loop, connection, table_cleanup):
async def f():
cursor = await connection.cursor(DictCursor)
sql = """CREATE TABLE bulkinsert (id INT(11), name CHAR(20),
age INT, height INT, PRIMARY KEY (id))"""
await cursor.execute(... | bytearray(b"""insert into bulkinsert (id, name, age, height) values (0, 'bob' , 21, 123 ),(1, 'jim' , 56, 45 ),(2, 'fred' , 100, 180 ) on duplicate key update age = values(age)""") | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_connection.py | test_autocommit | self.assertEqual | numeric_literal | 37 | import asyncio
import gc
import os
import sys
import unittest
import aiomysql
from tests._testutils import run_until_complete
from tests.base import AIOPyMySQLTestCase
PY_341 = sys.version_info >= (3, 4, 1)
class TestConnection(AIOPyMySQLTestCase):
def fill_my_cnf(self):
tests_root = os.path.abspath(os.p... | 0) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_connection.py | test_previous_cursor_not_closed | self.assertEqual | numeric_literal | 32 | import asyncio
import gc
import os
import sys
import unittest
import aiomysql
from tests._testutils import run_until_complete
from tests.base import AIOPyMySQLTestCase
PY_341 = sys.version_info >= (3, 4, 1)
class TestConnection(AIOPyMySQLTestCase):
def fill_my_cnf(self):
tests_root = os.path.abspath(os.p... | 3) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_connection.py | test_largedata | self.assertEqual | variable | 36 | import asyncio
import gc
import os
import sys
import unittest
import aiomysql
from tests._testutils import run_until_complete
from tests.base import AIOPyMySQLTestCase
PY_341 = sys.version_info >= (3, 4, 1)
class TestConnection(AIOPyMySQLTestCase):
def fill_my_cnf(self):
tests_root = os.path.abspath(os.p... | t) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_connection.py | test_config_file | self.assertEqual | numeric_literal | 39 | import asyncio
import gc
import os
import sys
import unittest
import aiomysql
from tests._testutils import run_until_complete
from tests.base import AIOPyMySQLTestCase
PY_341 = sys.version_info >= (3, 4, 1)
class TestConnection(AIOPyMySQLTestCase):
def fill_my_cnf(self):
tests_root = os.path.abspath(os.p... | 42) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_connection.py | test_connection_info_methods | self.assertIsInstance | variable | 28 | import asyncio
import gc
import os
import sys
import unittest
import aiomysql
from tests._testutils import run_until_complete
from tests.base import AIOPyMySQLTestCase
PY_341 = sys.version_info >= (3, 4, 1)
class TestConnection(AIOPyMySQLTestCase):
def fill_my_cnf(self):
tests_root = os.path.abspath(os.p... | int) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_connection.py | test_connection_info_methods | self.assertIsInstance | variable | 31 | import asyncio
import gc
import os
import sys
import unittest
import aiomysql
from tests._testutils import run_until_complete
from tests.base import AIOPyMySQLTestCase
PY_341 = sys.version_info >= (3, 4, 1)
class TestConnection(AIOPyMySQLTestCase):
def fill_my_cnf(self):
tests_root = os.path.abspath(os.p... | str) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_connection.py | test_connect_using_unix_socket | self.assertEqual | variable | 28 | import asyncio
import gc
import os
import sys
import unittest
import aiomysql
from tests._testutils import run_until_complete
from tests.base import AIOPyMySQLTestCase
PY_341 = sys.version_info >= (3, 4, 1)
class TestConnection(AIOPyMySQLTestCase):
def fill_my_cnf(self):
tests_root = os.path.abspath(os.p... | sock) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_connection.py | test_connection_ping | self.assertEqual | bool_literal | 28 | import asyncio
import gc
import os
import sys
import unittest
import aiomysql
from tests._testutils import run_until_complete
from tests.base import AIOPyMySQLTestCase
PY_341 = sys.version_info >= (3, 4, 1)
class TestConnection(AIOPyMySQLTestCase):
def fill_my_cnf(self):
tests_root = os.path.abspath(os.p... | False) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_connection.py | test_config_file_with_different_group | self.assertEqual | string_literal | 35 | import asyncio
import gc
import os
import sys
import unittest
import aiomysql
from tests._testutils import run_until_complete
from tests.base import AIOPyMySQLTestCase
PY_341 = sys.version_info >= (3, 4, 1)
class TestConnection(AIOPyMySQLTestCase):
def fill_my_cnf(self):
tests_root = os.path.abspath(os.p... | 'utf8') | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_connection.py | test_config_file_with_different_group | self.assertEqual | string_literal | 36 | import asyncio
import gc
import os
import sys
import unittest
import aiomysql
from tests._testutils import run_until_complete
from tests.base import AIOPyMySQLTestCase
PY_341 = sys.version_info >= (3, 4, 1)
class TestConnection(AIOPyMySQLTestCase):
def fill_my_cnf(self):
tests_root = os.path.abspath(os.p... | 'root') | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_connection.py | test_utf8mb4 | self.assertEqual | variable | 29 | import asyncio
import gc
import os
import sys
import unittest
import aiomysql
from tests._testutils import run_until_complete
from tests.base import AIOPyMySQLTestCase
PY_341 = sys.version_info >= (3, 4, 1)
class TestConnection(AIOPyMySQLTestCase):
def fill_my_cnf(self):
tests_root = os.path.abspath(os.p... | charset) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_connection.py | test_connection_properties | self.assertEqual | complex_expr | 30 | import asyncio
import gc
import os
import sys
import unittest
import aiomysql
from tests._testutils import run_until_complete
from tests.base import AIOPyMySQLTestCase
PY_341 = sys.version_info >= (3, 4, 1)
class TestConnection(AIOPyMySQLTestCase):
def fill_my_cnf(self):
tests_root = os.path.abspath(os.p... | self.db) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_connection.py | test_select_db | self.assertEqual | variable | 37 | import asyncio
import gc
import os
import sys
import unittest
import aiomysql
from tests._testutils import run_until_complete
from tests.base import AIOPyMySQLTestCase
PY_341 = sys.version_info >= (3, 4, 1)
class TestConnection(AIOPyMySQLTestCase):
def fill_my_cnf(self):
tests_root = os.path.abspath(os.p... | other_db) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_cursor.py | test_fetchmany_no_result | self.assertEqual | variable | 42 | import asyncio
from tests import base
from tests._testutils import run_until_complete
from aiomysql import ProgrammingError, Cursor, InterfaceError
class TestCursor(base.AIOPyMySQLTestCase):
def _prepare(self, conn):
cur = yield from conn.cursor()
yield from cur.execute("DROP TABLE IF EXISTS tbl;... | r) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_cursor.py | test_executemany | self.assertEqual | numeric_literal | 45 | import asyncio
from tests import base
from tests._testutils import run_until_complete
from aiomysql import ProgrammingError, Cursor, InterfaceError
class TestCursor(base.AIOPyMySQLTestCase):
def _prepare(self, conn):
cur = yield from conn.cursor()
yield from cur.execute("DROP TABLE IF EXISTS tbl;... | 3) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_cursor.py | test_custom_cursor | self.assertEqual | numeric_literal | 45 | import asyncio
from tests import base
from tests._testutils import run_until_complete
from aiomysql import ProgrammingError, Cursor, InterfaceError
class TestCursor(base.AIOPyMySQLTestCase):
def _prepare(self, conn):
cur = yield from conn.cursor()
yield from cur.execute("DROP TABLE IF EXISTS tbl;... | 42) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_cursor.py | test_scroll_relative | self.assertEqual | variable | 44 | import asyncio
from tests import base
from tests._testutils import run_until_complete
from aiomysql import ProgrammingError, Cursor, InterfaceError
class TestCursor(base.AIOPyMySQLTestCase):
def _prepare(self, conn):
cur = yield from conn.cursor()
yield from cur.execute("DROP TABLE IF EXISTS tbl;... | ret) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_cursor.py | test_cursor_properties | self.assertIs | variable | 40 | import asyncio
from tests import base
from tests._testutils import run_until_complete
from aiomysql import ProgrammingError, Cursor, InterfaceError
class TestCursor(base.AIOPyMySQLTestCase):
def _prepare(self, conn):
cur = yield from conn.cursor()
yield from cur.execute("DROP TABLE IF EXISTS tbl;... | conn) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_cursor.py | test_single_tuple | self.assertEqual | func_call | 49 | import asyncio
from tests import base
from tests._testutils import run_until_complete
from aiomysql import ProgrammingError, Cursor, InterfaceError
class TestCursor(base.AIOPyMySQLTestCase):
def _prepare(self, conn):
cur = yield from conn.cursor()
yield from cur.execute("DROP TABLE IF EXISTS tbl;... | list(r)) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_cursor.py | test_custom_cursor | self.assertIsInstance | variable | 42 | import asyncio
from tests import base
from tests._testutils import run_until_complete
from aiomysql import ProgrammingError, Cursor, InterfaceError
class TestCursor(base.AIOPyMySQLTestCase):
def _prepare(self, conn):
cur = yield from conn.cursor()
yield from cur.execute("DROP TABLE IF EXISTS tbl;... | MyCursor) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_cursor.py | test_morgify | self.assertEqual | variable | 46 | import asyncio
from tests import base
from tests._testutils import run_until_complete
from aiomysql import ProgrammingError, Cursor, InterfaceError
class TestCursor(base.AIOPyMySQLTestCase):
def _prepare(self, conn):
cur = yield from conn.cursor()
yield from cur.execute("DROP TABLE IF EXISTS tbl;... | expected) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_cursor.py | test_cursor_properties | self.assertEqual | complex_expr | 43 | import asyncio
from tests import base
from tests._testutils import run_until_complete
from aiomysql import ProgrammingError, Cursor, InterfaceError
class TestCursor(base.AIOPyMySQLTestCase):
def _prepare(self, conn):
cur = yield from conn.cursor()
yield from cur.execute("DROP TABLE IF EXISTS tbl;... | conn.echo) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_cursor.py | test_executemany | self.assertIsNone | variable | 52 | import asyncio
from tests import base
from tests._testutils import run_until_complete
from aiomysql import ProgrammingError, Cursor, InterfaceError
class TestCursor(base.AIOPyMySQLTestCase):
def _prepare(self, conn):
cur = yield from conn.cursor()
yield from cur.execute("DROP TABLE IF EXISTS tbl;... | row_count) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_cursor.py | test_custom_cursor_not_cursor_subclass | self.assertRaises | variable | 41 | import asyncio
from tests import base
from tests._testutils import run_until_complete
from aiomysql import ProgrammingError, Cursor, InterfaceError
class TestCursor(base.AIOPyMySQLTestCase):
def _prepare(self, conn):
cur = yield from conn.cursor()
yield from cur.execute("DROP TABLE IF EXISTS tbl;... | TypeError) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_cursor.py | test_close | self.assertTrue | complex_expr | 41 | import asyncio
from tests import base
from tests._testutils import run_until_complete
from aiomysql import ProgrammingError, Cursor, InterfaceError
class TestCursor(base.AIOPyMySQLTestCase):
def _prepare(self, conn):
cur = yield from conn.cursor()
yield from cur.execute("DROP TABLE IF EXISTS tbl;... | cur.closed) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_cursor.py | test_scroll_index_error | self.assertRaises | variable | 42 | import asyncio
from tests import base
from tests._testutils import run_until_complete
from aiomysql import ProgrammingError, Cursor, InterfaceError
class TestCursor(base.AIOPyMySQLTestCase):
def _prepare(self, conn):
cur = yield from conn.cursor()
yield from cur.execute("DROP TABLE IF EXISTS tbl;... | IndexError) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_deserialize_cursor.py | test_deserialize_cursor | self.assertEqual | string_literal | 85 | import copy
import asyncio
import aiomysql.cursors
from tests import base
from tests._testutils import run_until_complete
class TestDeserializeCursor(base.AIOPyMySQLTestCase):
bob = ("bob", 21, {"k1": "pretty", "k2": [18, 25]})
jim = ("jim", 56, {"k1": "rich", "k2": [20, 60]})
fred = ("fred", 100, {"k1": ... | "fetchall failed via DictCursor") | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_deserialize_cursor.py | test_deserialize_cursor | self.assertEqual | string_literal | 91 | import copy
import asyncio
import aiomysql.cursors
from tests import base
from tests._testutils import run_until_complete
class TestDeserializeCursor(base.AIOPyMySQLTestCase):
bob = ("bob", 21, {"k1": "pretty", "k2": [18, 25]})
jim = ("jim", 56, {"k1": "rich", "k2": [20, 60]})
fred = ("fred", 100, {"k1": ... | "fetchmany failed via DictCursor") | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_deserialize_cursor.py | test_deserialize_cursor | self.assertEqual | string_literal | 74 | import copy
import asyncio
import aiomysql.cursors
from tests import base
from tests._testutils import run_until_complete
class TestDeserializeCursor(base.AIOPyMySQLTestCase):
bob = ("bob", 21, {"k1": "pretty", "k2": [18, 25]})
jim = ("jim", 56, {"k1": "rich", "k2": [20, 60]})
fred = ("fred", 100, {"k1": ... | "fetchone via DeserializeCursor failed") | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_deserialize_cursor.py | test_deserialize_cursor | self.assertEqual | string_literal | 79 | import copy
import asyncio
import aiomysql.cursors
from tests import base
from tests._testutils import run_until_complete
class TestDeserializeCursor(base.AIOPyMySQLTestCase):
bob = ("bob", 21, {"k1": "pretty", "k2": [18, 25]})
jim = ("jim", 56, {"k1": "rich", "k2": [20, 60]})
fred = ("fred", 100, {"k1": ... | "fetch a 1 row result via fetchall failed via " "DeserializeCursor") | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_deserialize_cursor.py | test_deserializedictcursor | self.assertEqual | string_literal | 71 | import copy
import asyncio
import aiomysql.cursors
from tests import base
from tests._testutils import run_until_complete
class TestDeserializeCursor(base.AIOPyMySQLTestCase):
bob = ("bob", 21, {"k1": "pretty", "k2": [18, 25]})
jim = ("jim", 56, {"k1": "rich", "k2": [20, 60]})
fred = ("fred", 100, {"k1": ... | "fetch a 1 row result via fetchall failed via " "DeserializationCursor") | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_dictcursor.py | test_custom_dict | self.assertEqual | string_literal | 75 | import asyncio
import datetime
import aiomysql.cursors
from tests import base
from tests._testutils import run_until_complete
class TestDictCursor(base.AIOPyMySQLTestCase):
bob = {'name': 'bob', 'age': 21,
'DOB': datetime.datetime(1990, 2, 6, 23, 4, 56)}
jim = {'name': 'jim', 'age': 56,
... | "list failed via MyDictCursor") | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_dictcursor.py | test_dictcursor | self.assertEqual | string_literal | 64 | import asyncio
import datetime
import aiomysql.cursors
from tests import base
from tests._testutils import run_until_complete
class TestDictCursor(base.AIOPyMySQLTestCase):
bob = {'name': 'bob', 'age': 21,
'DOB': datetime.datetime(1990, 2, 6, 23, 4, 56)}
jim = {'name': 'jim', 'age': 56,
... | "fetchone via DictCursor failed") | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_dictcursor.py | test_dictcursor | self.assertEqual | string_literal | 75 | import asyncio
import datetime
import aiomysql.cursors
from tests import base
from tests._testutils import run_until_complete
class TestDictCursor(base.AIOPyMySQLTestCase):
bob = {'name': 'bob', 'age': 21,
'DOB': datetime.datetime(1990, 2, 6, 23, 4, 56)}
jim = {'name': 'jim', 'age': 56,
... | "fetchall failed via DictCursor") | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_dictcursor.py | test_dictcursor | self.assertEqual | string_literal | 80 | import asyncio
import datetime
import aiomysql.cursors
from tests import base
from tests._testutils import run_until_complete
class TestDictCursor(base.AIOPyMySQLTestCase):
bob = {'name': 'bob', 'age': 21,
'DOB': datetime.datetime(1990, 2, 6, 23, 4, 56)}
jim = {'name': 'jim', 'age': 56,
... | "fetchmany failed via DictCursor") | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_dictcursor.py | test_custom_dict | self.assertEqual | string_literal | 66 | import asyncio
import datetime
import aiomysql.cursors
from tests import base
from tests._testutils import run_until_complete
class TestDictCursor(base.AIOPyMySQLTestCase):
bob = {'name': 'bob', 'age': 21,
'DOB': datetime.datetime(1990, 2, 6, 23, 4, 56)}
jim = {'name': 'jim', 'age': 56,
... | "fetchone() returns MyDictCursor") | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_dictcursor.py | test_custom_dict | self.assertEqual | string_literal | 70 | import asyncio
import datetime
import aiomysql.cursors
from tests import base
from tests._testutils import run_until_complete
class TestDictCursor(base.AIOPyMySQLTestCase):
bob = {'name': 'bob', 'age': 21,
'DOB': datetime.datetime(1990, 2, 6, 23, 4, 56)}
jim = {'name': 'jim', 'age': 56,
... | "fetchall failed via MyDictCursor") | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_dictcursor.py | test_dictcursor | self.assertEqual | string_literal | 68 | import asyncio
import datetime
import aiomysql.cursors
from tests import base
from tests._testutils import run_until_complete
class TestDictCursor(base.AIOPyMySQLTestCase):
bob = {'name': 'bob', 'age': 21,
'DOB': datetime.datetime(1990, 2, 6, 23, 4, 56)}
jim = {'name': 'jim', 'age': 56,
... | "fetch a 1 row result via fetchall failed via " "DictCursor") | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_issues.py | test_issue_323 | assert | numeric_literal | 36 | import datetime
import unittest
import aiomysql
import pytest
from pymysql.err import Warning
from tests import base
from tests._testutils import run_until_complete
@pytest.mark.run_loop
async def test_issue_323(mysql_server, loop, recwarn):
async with aiomysql.create_pool(**mysql_server['conn_params'],
... | 0 | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_issues.py | test_issue_323 | assert | numeric_literal | 41 | import datetime
import unittest
import aiomysql
import pytest
from pymysql.err import Warning
from tests import base
from tests._testutils import run_until_complete
@pytest.mark.run_loop
async def test_issue_323(mysql_server, loop, recwarn):
async with aiomysql.create_pool(**mysql_server['conn_params'],
... | 1 | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
aio-libs/aiomysql | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | train | train | tests/test_issues.py | test_issue_37 | self.assertEqual | variable | 20 | import datetime
import unittest
import aiomysql
import pytest
from pymysql.err import Warning
from tests import base
from tests._testutils import run_until_complete
class TestNewIssues(base.AIOPyMySQLTestCase):
@run_until_complete
def test_issue_37(self):
conn = self.connections[0]
c = yield ... | r) | 2eb8533d18b3a231231561a3ac881ce334f01312 | 176 | v2_extractor_at_anchor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.