mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Tests: fix Show Referring Objects
This commit is contained in:
@@ -74,7 +74,7 @@ def get_referrer_info(searched_obj):
|
||||
ret.append(pydevd_xml.var_to_xml(
|
||||
searched_obj,
|
||||
'Skipping getting referrers for None',
|
||||
additionalInXml=' id="%s"' % (id(searched_obj),)))
|
||||
additional_in_xml=' id="%s"' % (id(searched_obj),)))
|
||||
ret.append('</for>\n')
|
||||
ret.append('</xml>')
|
||||
ret = ''.join(ret)
|
||||
@@ -95,7 +95,7 @@ def get_referrer_info(searched_obj):
|
||||
ret.append(pydevd_xml.var_to_xml(
|
||||
searched_obj,
|
||||
'Exception raised while trying to get_referrers.',
|
||||
additionalInXml=' id="%s"' % (id(searched_obj),)))
|
||||
additional_in_xml=' id="%s"' % (id(searched_obj),)))
|
||||
ret.append('</for>\n')
|
||||
ret.append('</xml>')
|
||||
ret = ''.join(ret)
|
||||
@@ -127,6 +127,7 @@ def get_referrer_info(searched_obj):
|
||||
'Referrers of obj with id="%s"' % (obj_id,)))
|
||||
ret.append('</for>\n')
|
||||
|
||||
curr_frame = sys._getframe()
|
||||
all_objects = None
|
||||
|
||||
for r in referrers:
|
||||
@@ -139,6 +140,9 @@ def get_referrer_info(searched_obj):
|
||||
if r is referrers:
|
||||
continue
|
||||
|
||||
if r is curr_frame.f_locals:
|
||||
continue
|
||||
|
||||
r_type = type(r)
|
||||
r_id = str(id(r))
|
||||
|
||||
@@ -204,7 +208,7 @@ def get_referrer_info(searched_obj):
|
||||
ret.append(pydevd_xml.var_to_xml(
|
||||
r,
|
||||
representation,
|
||||
additionalInXml=' id="%s"%s' % (r_id, found_as)))
|
||||
additional_in_xml=' id="%s"%s' % (r_id, found_as)))
|
||||
finally:
|
||||
if DEBUG:
|
||||
sys.stderr.write('Done searching for references.\n')
|
||||
@@ -227,7 +231,7 @@ def get_referrer_info(searched_obj):
|
||||
ret.append(pydevd_xml.var_to_xml(
|
||||
searched_obj,
|
||||
'Error getting referrers for:',
|
||||
additionalInXml=' id="%s"' % (id(searched_obj),)))
|
||||
additional_in_xml=' id="%s"' % (id(searched_obj),)))
|
||||
ret.append('</for>\n')
|
||||
ret.append('</xml>')
|
||||
ret = ''.join(ret)
|
||||
|
||||
Reference in New Issue
Block a user