]> 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:45:03 +0000 (02:45 +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 ef7b7ee4eb8e26d270fc762ae0937d53cf4dfed3..d5be36c0ba980991b3eeea8fc55e62e8010821df 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 b3477bc5265a1a238ab5c9ec4e8a9d5848f72ce3..58e0271aa22f68786039c0a27afd7abaa54617b0 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):