Skip to content

python_files/testing_tools/unittest_discovery.py has a Tornado hack w/ no reference to an issue to replace the hack #23050

@brettcannon

Description

@brettcannon

def get_sourceline(obj):
try:
s, n = inspect.getsourcelines(obj)
except:
try:
# this handles `tornado` case we need a better
# way to get to the wrapped function.
# This is a temporary solution
s, n = inspect.getsourcelines(obj.orig_method)
except:
return "*"

Those bare except statements are also extremely broad.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions