]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
remove _py3k suffixes from test files
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 20 Sep 2025 22:31:25 +0000 (18:31 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 20 Sep 2025 22:31:25 +0000 (18:31 -0400)
on the theme of 2.0/2.1 are relatively similar right now, do
some more cleanup removing the py3k suffixes that we dont need anymore.

I'm not sure that the logic that would search for these suffixes is
even present anymore and I would guess we removed it when we removed
py2k support.  However, I am planning on possibly bringing it back
for some of the py314 stuff, so I still want to be able to do
suffix stuff.  that will be for another patch.

Change-Id: I929e6edd922f8d5f943acce77191fb1e3035b42c

test/base/test_misc_py3k.py [deleted file]
test/base/test_typing_utils.py
test/dialect/postgresql/test_async_pg.py [moved from test/dialect/postgresql/test_async_pg_py3k.py with 100% similarity]
test/ext/asyncio/test_engine.py [moved from test/ext/asyncio/test_engine_py3k.py with 100% similarity]
test/ext/asyncio/test_scoping.py [moved from test/ext/asyncio/test_scoping_py3k.py with 98% similarity]
test/ext/asyncio/test_session.py [moved from test/ext/asyncio/test_session_py3k.py with 99% similarity]
test/orm/test_dataclasses.py [moved from test/orm/test_dataclasses_py3k.py with 100% similarity]

diff --git a/test/base/test_misc_py3k.py b/test/base/test_misc_py3k.py
deleted file mode 100644 (file)
index 99dbe2a..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-import operator
-from typing import cast
-
-from sqlalchemy import Column
-from sqlalchemy.testing import eq_
-from sqlalchemy.testing import fixtures
-
-
-class TestGenerics(fixtures.TestBase):
-    def test_traversible_is_generic(self):
-        """test #6759"""
-        col = Column[int]
-
-        # looked in the source for typing._GenericAlias.
-        # col.__origin__ is Column, but it's not public API.
-        # __reduce__ could change too but seems good enough for now
-        eq_(cast(object, col).__reduce__(), (operator.getitem, (Column, int)))
index c5c5015adbbd06cd5ccb71990edbc19da4046532..58aa15391b45a8f0ecce5144a9b38d6ea08d2e0f 100644 (file)
@@ -1,14 +1,17 @@
 # NOTE: typing implementation is full of heuristic so unit test it to avoid
 # unexpected breakages.
 
+import operator
 import typing
+from typing import cast
 
 import typing_extensions
 
+from sqlalchemy import Column
+from sqlalchemy.testing import eq_
 from sqlalchemy.testing import fixtures
+from sqlalchemy.testing import is_
 from sqlalchemy.testing import requires
-from sqlalchemy.testing.assertions import eq_
-from sqlalchemy.testing.assertions import is_
 from sqlalchemy.util import py312
 from sqlalchemy.util import py314
 from sqlalchemy.util import typing as sa_typing
@@ -240,6 +243,17 @@ def exec_code(code: str, *vars: str) -> typing.Any:
     return [scope[name] for name in vars]
 
 
+class TestGenerics(fixtures.TestBase):
+    def test_traversible_is_generic(self):
+        """test #6759"""
+        col = Column[int]
+
+        # looked in the source for typing._GenericAlias.
+        # col.__origin__ is Column, but it's not public API.
+        # __reduce__ could change too but seems good enough for now
+        eq_(cast(object, col).__reduce__(), (operator.getitem, (Column, int)))
+
+
 class TestTestingThings(fixtures.TestBase):
     def test_unions_are_the_same(self):
         # the point of this test is to reduce the cases to test since
similarity index 98%
rename from test/ext/asyncio/test_scoping_py3k.py
rename to test/ext/asyncio/test_scoping.py
index caba1c66001fe2be4340186a69d11eda536e1385..de00108bc4c437ed76d5839e5d61bb7a3ff0d046 100644 (file)
@@ -7,7 +7,7 @@ from sqlalchemy.orm import sessionmaker
 from sqlalchemy.testing import async_test
 from sqlalchemy.testing import eq_
 from sqlalchemy.testing import is_
-from .test_session_py3k import AsyncFixture
+from .test_session import AsyncFixture
 
 
 class AsyncScopedSessionTest(AsyncFixture):
similarity index 99%
rename from test/ext/asyncio/test_session_py3k.py
rename to test/ext/asyncio/test_session.py
index def178208b0e7f20e116b5fe904bda48dcefa692..22d53284ad19215250a7d10f8e00877ccc7e3509 100644 (file)
@@ -48,7 +48,7 @@ from sqlalchemy.testing.assertions import not_in
 from sqlalchemy.testing.entities import ComparableEntity
 from sqlalchemy.testing.provision import normalize_sequence
 from sqlalchemy.testing.schema import Column
-from .test_engine_py3k import AsyncFixture as _AsyncFixture
+from .test_engine import AsyncFixture as _AsyncFixture
 from ...orm import _fixtures