Esempio n. 1
0
def test_get_logging_handler():
    args = Object()
    args.logfile = None
    handler = get_logging_handler(args, ERROR)
    assert isinstance(handler, FileHandler)
    assert handler._filename == DEFAULT_LOGFILE
    assert handler.level == ERROR
Esempio n. 2
0
def test_get_logging_handler_win():
    args = Object()
    args.logfile = None
    py.test.raises(OSError, 'get_logging_handler(args)')