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

Closed

Description

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.

Activity

  1. changed the title [-]`python_files/testing_tools/unittest_discovery.py` has a Tornado hack w/ no reference to a file[/-] [+]`python_files/testing_tools/unittest_discovery.py` has a Tornado hack w/ no reference to an issue to replace the hack[/+] on Mar 12, 2024
  2. eleanorjboyd commented on Mar 26, 2024

    @eleanorjboyd
    Member

    this code will no longer be used once the test rewrite is finished and the old code is deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions