From: Daniele Varrazzo Date: Fri, 7 Jan 2022 01:11:29 +0000 (+0100) Subject: Drop broken test about setting prepare attributes on the class X-Git-Tag: pool-3.1~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c44c4e6a059acc57a730ca92eb0e552717097bd0;p=thirdparty%2Fpsycopg.git Drop broken test about setting prepare attributes on the class I'm just clobbering the property here. It doesn't work. Thankfully it wasn't documented to work... --- diff --git a/tests/test_prepared.py b/tests/test_prepared.py index fb3da6e99..4984b5f90 100644 --- a/tests/test_prepared.py +++ b/tests/test_prepared.py @@ -8,18 +8,6 @@ from decimal import Decimal import pytest -def test_connection_attributes(conn, monkeypatch): - assert conn.prepare_threshold == 5 - assert conn.prepared_max == 100 - - # They are on the class - monkeypatch.setattr(conn.__class__, "prepare_threshold", 10) - assert conn.prepare_threshold == 10 - - monkeypatch.setattr(conn.__class__, "prepared_max", 200) - assert conn.prepared_max == 200 - - def test_dont_prepare(conn): cur = conn.cursor() for i in range(10): diff --git a/tests/test_prepared_async.py b/tests/test_prepared_async.py index d6217b42c..9528bb80f 100644 --- a/tests/test_prepared_async.py +++ b/tests/test_prepared_async.py @@ -10,18 +10,6 @@ import pytest pytestmark = pytest.mark.asyncio -async def test_connection_attributes(aconn, monkeypatch): - assert aconn.prepare_threshold == 5 - assert aconn.prepared_max == 100 - - # They are on the class - monkeypatch.setattr(aconn.__class__, "prepare_threshold", 10) - assert aconn.prepare_threshold == 10 - - monkeypatch.setattr(aconn.__class__, "prepared_max", 200) - assert aconn.prepared_max == 200 - - async def test_dont_prepare(aconn): cur = aconn.cursor() for i in range(10):