psycopg.git / summary / log / commit / refs
commit db09c38e71f686271de60440d1bded64e4cde028
Author: Daniele Varrazzo <daniele.varrazzo@gmail.com>
Date: Sat Dec 28 00:57:02 2024 +0000
refactor(tests): remove Counter from utils module
tests/pool/test_pool.py | 3 ++-
tests/pool/test_pool_async.py | 3 ++-
tests/utils.py | 3 ---
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/tests/pool/test_pool.py b/tests/pool/test_pool.py
index d92859cb..c10018ae 100644
--- a/tests/pool/test_pool.py
+++ b/tests/pool/test_pool.py
@@ -7,6 +7,7 @@ import logging
import weakref
from time import time
from typing import Any
+from collections import Counter
import pytest
@@ -14,7 +15,7 @@ import psycopg
from psycopg.pq import TransactionStatus
from psycopg.rows import class_row, Row, TupleRow
-from ..utils import assert_type, Counter, set_autocommit
+from ..utils import assert_type, set_autocommit
from ..acompat import Event, spawn, gather, sleep, skip_sync
from .test_pool_common import delay_connection
diff --git a/tests/pool/test_pool_async.py b/tests/pool/test_pool_async.py
index 464e22ba..a1a13344 100644
--- a/tests/pool/test_pool_async.py
+++ b/tests/pool/test_pool_async.py
@@ -4,6 +4,7 @@ import logging
import weakref
from time import time
from typing import Any
+from collections import Counter
import pytest
@@ -11,7 +12,7 @@ import psycopg
from psycopg.pq import TransactionStatus
from psycopg.rows import class_row, Row, TupleRow
-from ..utils import assert_type, Counter, set_autocommit
+from ..utils import assert_type, set_autocommit
from ..acompat import AEvent, spawn, gather, asleep, skip_sync
from .test_pool_common_async import delay_connection
diff --git a/tests/utils.py b/tests/utils.py
index 95e5ff99..0cdba8bf 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -3,14 +3,11 @@ from __future__ import annotations
import re
import sys
import operator
-import collections
from typing import Callable
from contextlib import contextmanager
import pytest
-Counter = collections.Counter
-
if sys.version_info >= (3, 11):
import typing
[parent: b9f86877fcf3]