]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Repair test in 32bit python builds.
authorFederico Caselli <cfederico87@gmail.com>
Sat, 12 Nov 2022 19:15:26 +0000 (20:15 +0100)
committerFederico Caselli <cfederico87@gmail.com>
Sat, 12 Nov 2022 19:15:26 +0000 (20:15 +0100)
Change-Id: I8287f3e1a975534c8a01a41c9dcc7e5e9f08bb52

lib/sqlalchemy/testing/requirements.py
lib/sqlalchemy/util/__init__.py
lib/sqlalchemy/util/compat.py
test/orm/test_cache_key.py

index 38d962fef7bdd151c6b822d5b3b71ffb2f116c86..3c63e93624eefcc926d0574e8cd28e3c54f1b6d3 100644 (file)
@@ -1438,6 +1438,10 @@ class SuiteRequirements(Requirements):
             lambda: util.cpython, "cPython interpreter needed"
         )
 
+    @property
+    def is64bit(self):
+        return exclusions.only_if(lambda: util.is64bit, "64bit required")
+
     @property
     def patch_library(self):
         def check_lib():
index bb4642a4ff66239ce524d9e97ccbccb032effe10..e82cfd76948f0ee28e30b34c89971714ff7ba695 100644 (file)
@@ -58,6 +58,7 @@ from .compat import decode_backslashreplace as decode_backslashreplace
 from .compat import dottedgetter as dottedgetter
 from .compat import has_refcount_gc as has_refcount_gc
 from .compat import inspect_getfullargspec as inspect_getfullargspec
+from .compat import is64bit as is64bit
 from .compat import local_dataclass_fields as local_dataclass_fields
 from .compat import osx as osx
 from .compat import py310 as py310
index 2899b425867341c57a40f4105cd2dd8d084cafe7..24f9bcf10635cb466c9798002fc9039627adf3de 100644 (file)
@@ -41,6 +41,7 @@ cpython = platform.python_implementation() == "CPython"
 win32 = sys.platform.startswith("win")
 osx = sys.platform.startswith("darwin")
 arm = "aarch" in platform.machine().lower()
+is64bit = platform.architecture()[0] == "64bit"
 
 has_refcount_gc = bool(cpython)
 
index 3106a71ad76d1039c65318fd89da35593fd7e9d2..a0bf8b5981a77251ee99f7ac6f728c42b2bf72f1 100644 (file)
@@ -1092,7 +1092,11 @@ class EmbeddedSubqTest(_RemoveListeners, DeclarativeMappedTest):
                 "concrete": True,
             }
 
-    @testing.combinations("tuples", "memory", argnames="assert_on")
+        Base.registry.configure()
+
+    @testing.combinations(
+        "tuples", ("memory", testing.requires.is64bit), argnames="assert_on"
+    )
     def test_cache_key_gen(self, assert_on):
         Employee = self.classes.Employee