Skip to content

Commit

Permalink
delete runtime variable
Browse files Browse the repository at this point in the history
  • Loading branch information
nevermore3 committed Dec 26, 2022
1 parent 92a7aff commit 11dae72
Show file tree
Hide file tree
Showing 3 changed files with 214 additions and 209 deletions.
15 changes: 11 additions & 4 deletions tests/common/plan_differ.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,22 @@ def _is_subdict_nested(self, expect, resp):

def _try_convert_json(j):
try:
return json.loads(j)
res = json.loads(j)
if isinstance(res, list):
for m in res:
if isinstance(m, dict):
if 'tagId' in m:
m.pop('tagId')
if 'type' in m:
m.pop('type')
return res
except:
return j

extracted_resp_dict = {}
if len(key_list) == 1:

for k in resp:
extracted_resp_dict[k] = _try_convert_json(resp[k])
for k in resp:
extracted_resp_dict[k] = _try_convert_json(resp[k])
else:
extracted_resp_dict = self._convert_jsonStr_to_dict(resp, key_list)

Expand Down
2 changes: 0 additions & 2 deletions tests/tck/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@ def executing_query(
exec_query(request, ngql, exec_ctx, sess)
sess.release()


@when(parse("profiling query:\n{query}"))
def profiling_query(query, exec_ctx, request):
ngql = "PROFILE {" + combine_query(query) + "}"
Expand Down Expand Up @@ -826,7 +825,6 @@ def drop_used_space(exec_ctx):
session = exec_ctx.get('current_session')
response(session, stmt)


@then(parse("the execution plan should be:\n{plan}"))
def check_plan(request, plan, exec_ctx):
ngql = exec_ctx["ngql"]
Expand Down
Loading

0 comments on commit 11dae72

Please sign in to comment.