mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
17 lines
192 B
Python
17 lines
192 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)
|