summaryrefslogtreecommitdiff
path: root/test/aaa_profiling
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-05-28 16:14:11 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-05-29 14:42:14 -0400
commit9272ae4f77d670bd2ff4c55f50bf47ad374e8319 (patch)
treee6f6189f1b74d97a9463cc57d884be267fab658c /test/aaa_profiling
parent056bad48e2bc948a08621ab841fd882cb6934262 (diff)
downloadsqlalchemy-9272ae4f77d670bd2ff4c55f50bf47ad374e8319.tar.gz
Remove loader option cycle
removed a reference cycle set up by loader options due to the attribute dictionary containing Load objects that reference that dictionary. Change-Id: Ie3159a084f819ae44ca4992b0dbe094fb69b2fa7
Diffstat (limited to 'test/aaa_profiling')
-rw-r--r--test/aaa_profiling/test_orm.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/aaa_profiling/test_orm.py b/test/aaa_profiling/test_orm.py
index 7456d5f5b..f261bc811 100644
--- a/test/aaa_profiling/test_orm.py
+++ b/test/aaa_profiling/test_orm.py
@@ -849,6 +849,11 @@ class JoinedEagerLoadTest(fixtures.MappedTest):
@profiling.function_call_count()
def go():
for i in range(100):
+ # NOTE: this test was broken in
+ # 77f1b7d236dba6b1c859bb428ef32d118ec372e6 because we started
+ # clearing out the attributes after the first iteration. make
+ # sure the attributes are there every time.
+ assert compile_state.attributes
exec_opts = {}
bind_arguments = {}
ORMCompileState.orm_pre_session_exec(
@@ -860,6 +865,7 @@ class JoinedEagerLoadTest(fixtures.MappedTest):
execution_options=exec_opts,
bind_arguments=bind_arguments,
)
+
r.context.compiled.compile_state = compile_state
obj = ORMCompileState.orm_setup_cursor_result(sess, {}, r)
list(obj)