summaryrefslogtreecommitdiff
path: root/test/sql
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-02-22 13:11:20 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2020-02-22 13:11:20 -0500
commit3cb614009ee87a115ec7230949c031402efb17c1 (patch)
treef892ada52a873dd6a7214edea517ecaef10f3fa9 /test/sql
parentca16c53651f819e9587ed29d7d1d7d937e7f25ce (diff)
downloadsqlalchemy-3cb614009ee87a115ec7230949c031402efb17c1.tar.gz
Ensure descendants of mixins don't become cacheable
HasPrefix / HasSuffixes / SupportsCloneAnnotations exported a _traverse_internals attribute that does not represent a complete traversal, meaning non-traversible subclasses would seem traversible. rename these attributes so that this does not occur. DML is currently not traversible (will be soon). Change-Id: I2605e61c8c3d49965335e66e09f4aeedc5e73bd3
Diffstat (limited to 'test/sql')
-rw-r--r--test/sql/test_compare.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/sql/test_compare.py b/test/sql/test_compare.py
index 2d0e39331..7333fb306 100644
--- a/test/sql/test_compare.py
+++ b/test/sql/test_compare.py
@@ -19,6 +19,7 @@ from sqlalchemy import select
from sqlalchemy import String
from sqlalchemy import Table
from sqlalchemy import table
+from sqlalchemy import testing
from sqlalchemy import text
from sqlalchemy import tuple_
from sqlalchemy import union
@@ -62,7 +63,6 @@ from sqlalchemy.testing import ne_
from sqlalchemy.testing.util import random_choices
from sqlalchemy.util import class_hierarchy
-
meta = MetaData()
meta2 = MetaData()
@@ -543,6 +543,10 @@ class CacheKeyFixture(object):
class CacheKeyTest(CacheKeyFixture, CoreFixtures, fixtures.TestBase):
+ @testing.combinations(table_a.update(), table_a.insert(), table_a.delete())
+ def test_dml_not_cached_yet(self, dml_stmt):
+ eq_(dml_stmt._generate_cache_key(), None)
+
def test_cache_key(self):
for fixtures_, compare_values in [
(self.fixtures, True),