Skip to content

Commit c3f9697

Browse files
committed
Delete unused helper function
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
1 parent 7cf822d commit c3f9697

File tree

1 file changed

+0
-19
lines changed
  • launch_testing/launch_testing/pytest

1 file changed

+0
-19
lines changed

launch_testing/launch_testing/pytest/plugin.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -245,25 +245,6 @@ def pytest_pycollect_makeitem(collector, name, obj):
245245
return items
246246

247247

248-
def get_error_context_from_obj(obj):
249-
"""Return formatted information of the object location."""
250-
try:
251-
fspath = inspect.getsourcefile(obj)
252-
except TypeError:
253-
return 'location information of the object not found'
254-
try:
255-
lines, lineno = inspect.getsourcelines(obj)
256-
except IOError:
257-
return f'file {fspath}: source code not available'
258-
error_msg = f'file {fspath}, line {lineno}'
259-
for line in lines:
260-
line = line.rstrip()
261-
error_msg += f'\n {line}'
262-
if line.lstrip().startswith('def'):
263-
break
264-
return error_msg
265-
266-
267248
def is_shutdown_test(item):
268249
"""Return `True` if the item is a launch test."""
269250
return getattr(item, '_launch_testing_is_shutdown', False)

0 commit comments

Comments
 (0)