summaryrefslogtreecommitdiff
path: root/test/aaa_profiling
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-06-28 12:47:32 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-06-29 13:46:44 -0400
commit0286dcb23d8f6facb09391b46581d525982c20a0 (patch)
tree255d38af67598d2cf6341b7e95d3acd0d18fb431 /test/aaa_profiling
parent5f5b56d646f154ee572c9de80449423304103bad (diff)
downloadsqlalchemy-0286dcb23d8f6facb09391b46581d525982c20a0.tar.gz
Remove _generate_path_cache_key()
loader options can now make a deterministic cache key based on the structure they are given, and this accommodates for aliased classes as well so that these cache keys are now "safe". Have baked query call upon the regular cache key method. Change-Id: Iaa2ef4064cfb16146f415ca73080f32003dd830d
Diffstat (limited to 'test/aaa_profiling')
-rw-r--r--test/aaa_profiling/test_orm.py41
1 files changed, 0 insertions, 41 deletions
diff --git a/test/aaa_profiling/test_orm.py b/test/aaa_profiling/test_orm.py
index 13e92f5c4..850159323 100644
--- a/test/aaa_profiling/test_orm.py
+++ b/test/aaa_profiling/test_orm.py
@@ -1,6 +1,5 @@
from sqlalchemy import and_
from sqlalchemy import ForeignKey
-from sqlalchemy import inspect
from sqlalchemy import Integer
from sqlalchemy import join
from sqlalchemy import String
@@ -1104,46 +1103,6 @@ class BranchedOptionTest(NoCache, fixtures.MappedTest):
configure_mappers()
- def test_generate_path_cache_key_unbound_branching(self):
- A, B, C, D, E, F, G = self.classes("A", "B", "C", "D", "E", "F", "G")
-
- base = joinedload(A.bs)
- opts = [
- base.joinedload(B.cs),
- base.joinedload(B.ds),
- base.joinedload(B.es),
- base.joinedload(B.fs),
- ]
-
- cache_path = inspect(A)._path_registry
-
- @profiling.function_call_count(warmup=1)
- def go():
- for opt in opts:
- opt._generate_path_cache_key(cache_path)
-
- go()
-
- def test_generate_path_cache_key_bound_branching(self):
- A, B, C, D, E, F, G = self.classes("A", "B", "C", "D", "E", "F", "G")
-
- base = Load(A).joinedload(A.bs)
- opts = [
- base.joinedload(B.cs),
- base.joinedload(B.ds),
- base.joinedload(B.es),
- base.joinedload(B.fs),
- ]
-
- cache_path = inspect(A)._path_registry
-
- @profiling.function_call_count(warmup=1)
- def go():
- for opt in opts:
- opt._generate_path_cache_key(cache_path)
-
- go()
-
def test_query_opts_unbound_branching(self):
A, B, C, D, E, F, G = self.classes("A", "B", "C", "D", "E", "F", "G")