forked from Rust-related/RustPython
19 lines
196 B
Python
19 lines
196 B
Python
|
|
import io
|
|
import sys
|
|
|
|
f = io.StringIO()
|
|
sys.stderr = f
|
|
|
|
import logging
|
|
|
|
logging.error('WOOT')
|
|
logging.warning('WARN')
|
|
|
|
res = f.getvalue()
|
|
|
|
assert 'WOOT' in res
|
|
assert 'WARN' in res
|
|
print(res)
|
|
|