Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PyTest memory utilization test
from logging import basicConfig, getLogger
import pytest
basicConfig()
log = getLogger()
log.setLevel('DEBUG')
def func_that_logs_a_lot():
for i in range(1000):
log.info('foo output %s/1000', i)
def test_func_that_logs_a_lot():
for _ in range(1000):
output = func_that_logs_a_lot()
log.info('got output: %s', output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.