]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Update pytest to v6
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 5 Aug 2020 01:30:47 +0000 (02:30 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 5 Aug 2020 01:48:40 +0000 (02:48 +0100)
psycopg3/tox.ini
psycopg3_c/tox.ini
tests/test_cursor_async.py

index f59f74e602a1a3b814e3292467456472098ae576..8ba46fefe1efce3235be6dd36637cbb136a20052 100644 (file)
@@ -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
index 2d4b7310fa99bc23d9761fcf26776b8a3a78f97e..7d7ed1624fcb7e030a97d63f5ada4ea613e1d086 100644 (file)
@@ -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
index e0f51438b968d80de9a4c6948a55c705b27eba4b..715d2027d20d538d55ab897620c9a6c7011fe7d9 100644 (file)
@@ -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(