コード例 #1
0
def test_close():
    logger = StdoutLogger()
    logger.open()

    logger.close()
    assert not logger.is_enabled()
    assert not logger.is_open()
コード例 #2
0
def test_open():
    logger = StdoutLogger()
    with pytest.warns(DeprecationWarning):
        logger.open()

    assert logger.is_enabled()
    with pytest.warns(DeprecationWarning):
        assert logger.is_open()
コード例 #3
0
def test_open():
    logger = StdoutLogger()
    logger.open()

    assert logger.is_enabled()
    assert logger.is_open()