]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Drop broken test about setting prepare attributes on the class
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 7 Jan 2022 01:11:29 +0000 (02:11 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 7 Jan 2022 01:35:35 +0000 (02:35 +0100)
I'm just clobbering the property here. It doesn't work. Thankfully it
wasn't documented to work...

tests/test_prepared.py
tests/test_prepared_async.py

index fb3da6e99d6fa3966ed598649781d83f1361137e..4984b5f903385c6f0f5b7b9b0eae188b3d8068d8 100644 (file)
@@ -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):
index d6217b42c42d7595d4a8925b8cb6caee094d0faf..9528bb80f769d64f5708d38e46e5307616c79485 100644 (file)
@@ -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):