Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 17 additions & 38 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,48 +1,27 @@
attrs==21.2.0
bcrypt==3.2.0
black==22.12.0
cached-property==1.5.2
certifi==2024.7.4
cffi>=1.17.0,<2.0.0
charset-normalizer==2.0.1
cryptography==41.0.0
distro==1.5.0
bcrypt>=4.0.0
black==24.10.0
cryptography>=41.0.0
docker>=5.0.0
flake8==7.1.0
freezegun>=1.3.0
grpcio>=1.42.0
idna==3.2
importlib-metadata==4.6.1
iniconfig==1.1.1
jsonschema==3.2.0
packaging==21.0
paramiko==2.10.1
pluggy>=1.0.0
packaging>=23.0
paramiko>=3.0.0
protobuf>=3.13.0,<7.0.0
py>=1.11.0
pycparser==2.20
PyNaCl==1.4.0
pyparsing==2.4.7
pyrsistent==0.18.0
pytest>=7.0.0,<8.0.0
pytest-asyncio==0.21.0
pytest>=7.0.0
pytest-asyncio>=0.21.0
pytest-docker>=3.0.0
python-dotenv==0.18.0
PyYAML==5.3.1
pyjwt==2.0.0
requests==2.31.0
texttable==1.6.4
toml==0.10.2
typing-extensions==4.12.2
urllib3==1.26.6
websocket-client==0.59.0
zipp==3.19.1
aiohttp>=3.9.0
pytest-pep8
pytest-flake8
flake8==6.1.0
sqlalchemy==1.4.26
pytest-pep8
python-dotenv>=1.0.0
PyYAML>=6.0
pyjwt>=2.4.0
requests>=2.31.0
sqlalchemy>=1.4.0,<2.0.0
typing-extensions>=4.6.0
aiohttp>=3.9.0
pylint-protobuf
cython
freezegun>=1.3.0
# pytest-cov
yandexcloud
-e .
10 changes: 2 additions & 8 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ async def aio_connection(endpoint, database):


@pytest.fixture()
async def driver(endpoint, database, event_loop):
async def driver(endpoint, database):
driver_config = ydb.DriverConfig(
endpoint,
database,
Expand All @@ -173,7 +173,7 @@ async def driver(endpoint, database, event_loop):


@pytest.fixture()
async def driver_sync(endpoint, database, event_loop):
async def driver_sync(endpoint, database):
driver_config = ydb.DriverConfig(
endpoint,
database,
Expand Down Expand Up @@ -261,7 +261,6 @@ def topic_consumer():


@pytest.fixture()
@pytest.mark.asyncio()
async def topic_path(driver, topic_consumer, database) -> str:
topic_path = database + "/test-topic"

Expand All @@ -279,7 +278,6 @@ async def topic_path(driver, topic_consumer, database) -> str:


@pytest.fixture()
@pytest.mark.asyncio()
async def topic2_path(driver, topic_consumer, database) -> str:
topic_path = database + "/test-topic2"

Expand All @@ -297,7 +295,6 @@ async def topic2_path(driver, topic_consumer, database) -> str:


@pytest.fixture()
@pytest.mark.asyncio()
async def topic_with_two_partitions_path(driver, topic_consumer, database) -> str:
topic_path = database + "/test-topic-two-partitions"

Expand All @@ -317,7 +314,6 @@ async def topic_with_two_partitions_path(driver, topic_consumer, database) -> st


@pytest.fixture()
@pytest.mark.asyncio()
async def topic_with_messages(driver, topic_consumer, database):
topic_path = database + "/test-topic-with-messages"
try:
Expand Down Expand Up @@ -348,7 +344,6 @@ async def topic_with_messages(driver, topic_consumer, database):


@pytest.fixture()
@pytest.mark.asyncio()
async def topic_with_messages_with_metadata(driver, topic_consumer, database):
topic_path = database + "/test-topic-with-messages-with-metadata"
try:
Expand All @@ -373,7 +368,6 @@ async def topic_with_messages_with_metadata(driver, topic_consumer, database):


@pytest.fixture()
@pytest.mark.asyncio()
async def topic_reader(driver, topic_consumer, topic_path) -> ydb.TopicReaderAsyncIO:
reader = driver.topic_client.reader(topic=topic_path, consumer=topic_consumer)
yield reader
Expand Down
6 changes: 3 additions & 3 deletions tests/oauth2_token_exchange/test_token_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ def test_oauth2_token_exchange_credentials_file():
},
},
http_request_is_expected=False,
get_token_error_text_part="Could not deserialize key data.",
get_token_error_text_part="Could not parse the provided public key.",
),
DataForConfigTest(
cfg={
Expand All @@ -640,7 +640,7 @@ def test_oauth2_token_exchange_credentials_file():
},
},
http_request_is_expected=False,
get_token_error_text_part="Could not deserialize key data.",
get_token_error_text_part="Unable to load PEM file",
),
DataForConfigTest(
cfg={
Expand All @@ -651,7 +651,7 @@ def test_oauth2_token_exchange_credentials_file():
},
},
http_request_is_expected=False,
get_token_error_text_part="sign() missing 1 required positional argument",
get_token_error_text_part="Invalid Key type for ECAlgorithm",
),
DataForConfigTest(
cfg_file="~/unknown-file.cfg",
Expand Down
4 changes: 2 additions & 2 deletions ydb/_topic_reader/topic_reader_asyncio_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@


@pytest.fixture(autouse=True)
def handle_exceptions(event_loop):
async def handle_exceptions():
def handler(loop, context):
print(context)

event_loop.set_exception_handler(handler)
asyncio.get_running_loop().set_exception_handler(handler)


@pytest.fixture()
Expand Down
Loading