From: Daniele Varrazzo Date: Wed, 5 Aug 2020 01:30:47 +0000 (+0100) Subject: Update pytest to v6 X-Git-Tag: 3.0.dev0~469 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f82d0284c896c10a34b4887e87910814478d71d;p=thirdparty%2Fpsycopg.git Update pytest to v6 --- diff --git a/psycopg3/tox.ini b/psycopg3/tox.ini index f59f74e60..8ba46fefe 100644 --- a/psycopg3/tox.ini +++ b/psycopg3/tox.ini @@ -4,8 +4,8 @@ isolated_build = True [testenv:py{36,37,38}] commands = - pytest ../tests + pytest ../tests {posargs} passenv = PG* PSYCOPG3_TEST_DSN PYTEST_ADDOPTS PSYCOPG3_IMPL deps = - pytest >= 5.3, < 6 - pytest-asyncio >= 0.12.0, < 0.13 + pytest >= 6, < 6.1 + pytest-asyncio >= 0.14.0, < 0.15 diff --git a/psycopg3_c/tox.ini b/psycopg3_c/tox.ini index 2d4b7310f..7d7ed1624 100644 --- a/psycopg3_c/tox.ini +++ b/psycopg3_c/tox.ini @@ -4,10 +4,9 @@ isolated_build = True [testenv] commands = - python ../psycopg3/setup.py develop pytest ../tests {posargs} passenv = PG* PSYCOPG3_TEST_DSN PYTEST_ADDOPTS PSYCOPG3_IMPL deps = - pytest >= 5.3, < 6 - pytest-asyncio >= 0.12.0, < 0.13 + pytest >= 6, < 6.1 + pytest-asyncio >= 0.14.0, < 0.15 -e {toxinidir}/../psycopg3 diff --git a/tests/test_cursor_async.py b/tests/test_cursor_async.py index e0f51438b..715d2027d 100644 --- a/tests/test_cursor_async.py +++ b/tests/test_cursor_async.py @@ -117,8 +117,8 @@ async def test_query_badenc(aconn): await cur.execute("select '\u20ac'") -@pytest.fixture(scope="session") -async def _execmany(svcconn): +@pytest.fixture(scope="function") +async def execmany(svcconn): cur = svcconn.cursor() cur.execute( """ @@ -129,13 +129,6 @@ async def _execmany(svcconn): svcconn.commit() -@pytest.fixture(scope="function") -async def execmany(svcconn, _execmany): - cur = svcconn.cursor() - cur.execute("truncate table execmany") - svcconn.commit() - - async def test_executemany(aconn, execmany): cur = aconn.cursor() await cur.executemany(