gunicorn/tests/test_005-lazywriter-isatty.py
2012-11-16 07:59:55 +01:00

14 lines
302 B
Python

import sys
from gunicorn.glogging import LazyWriter
def test_lazywriter_isatty():
orig = sys.stdout
sys.stdout = LazyWriter('test.log')
try:
sys.stdout.isatty()
except AttributeError:
raise AssertionError("LazyWriter has no attribute 'isatty'")
sys.stdout = orig