From 3cb614009ee87a115ec7230949c031402efb17c1 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 22 Feb 2020 13:11:20 -0500 Subject: 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 --- test/sql/test_compare.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test') 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), -- cgit v1.2.1