From c2b4e550f081e2701ecae697273340ef3fdae190 Mon Sep 17 00:00:00 2001 From: Sangat Das Date: Thu, 3 Feb 2022 08:28:57 +0000 Subject: [PATCH 1/3] Reduce deprecation warnings in tests --- pytest.ini | 7 +++++++ setup.py | 2 +- tests/conftest.py | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pytest.ini b/pytest.ini index 43cb8a7..3851b6d 100644 --- a/pytest.ini +++ b/pytest.ini @@ -3,3 +3,10 @@ testpaths = tests/ norecursedirs = .* *.egg *.egg-info env* devenv* docs addopts = -m "not abci" looponfailroots = planetmint tests +asyncio_mode = strict +markers = + userfixtures + language + tendermint + usefixture + execute diff --git a/setup.py b/setup.py index 789a402..c2380de 100644 --- a/setup.py +++ b/setup.py @@ -74,7 +74,7 @@ tests_require = [ install_requires = [ 'chardet==3.0.4', - 'aiohttp==3.7.4', + 'aiohttp==3.8.1', 'bigchaindb-abci==1.0.7', 'planetmint-cryptoconditions>=0.9.0', 'flask-cors==3.0.10', diff --git a/tests/conftest.py b/tests/conftest.py index 77e22cf..df99a4d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -9,6 +9,7 @@ Tasks: 1. setup test database before starting the tests 2. delete test database after running the tests """ +import asyncio import json import os import copy @@ -430,7 +431,7 @@ def abci_http(_setup_database, _configure_planetmint, abci_server, return False -@pytest.yield_fixture(scope='session') +@pytest.fixture(scope='session') def event_loop(): import asyncio From 20505e16694f90cb0a599b884e4d1b57a4a22363 Mon Sep 17 00:00:00 2001 From: Sangat Das Date: Thu, 3 Feb 2022 16:15:41 +0530 Subject: [PATCH 2/3] Update conftest.py --- tests/conftest.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index df99a4d..67d31d3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -9,7 +9,6 @@ Tasks: 1. setup test database before starting the tests 2. delete test database after running the tests """ -import asyncio import json import os import copy From afbffd380e68ba7131f93e46b80e3ab9a1edef2d Mon Sep 17 00:00:00 2001 From: Sangat Das Date: Thu, 3 Feb 2022 12:34:14 +0000 Subject: [PATCH 3/3] Revert aiohttp upgrade --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c2380de..789a402 100644 --- a/setup.py +++ b/setup.py @@ -74,7 +74,7 @@ tests_require = [ install_requires = [ 'chardet==3.0.4', - 'aiohttp==3.8.1', + 'aiohttp==3.7.4', 'bigchaindb-abci==1.0.7', 'planetmint-cryptoconditions>=0.9.0', 'flask-cors==3.0.10',