Created
November 28, 2017 22:02
-
-
Save mplanchard/c68a1a45a5bfca875fe141cc0e814d38 to your computer and use it in GitHub Desktop.
PyTest memory utilization test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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