Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_empty_profile():
with Profiler() as profiler:
pass
profiler.output(renderer=renderers.ConsoleRenderer())
def test_console(deep_profiler_session):
ConsoleRenderer().render(deep_profiler_session)
def get_renderer_class(renderer):
if renderer == 'text':
return renderers.ConsoleRenderer
elif renderer == 'html':
return renderers.HTMLRenderer
elif renderer == 'json':
return renderers.JSONRenderer
else:
return object_with_import_path(renderer)
def output_text(self, root=None, unicode=False, color=False, show_all=False, timeline=False):
return renderers.ConsoleRenderer(unicode=unicode, color=color, show_all=show_all, timeline=timeline).render(self.last_session)