Exemplo n.º 1
0
def test_to_logfile_opt():
    cases = [
        (True, None),
        (False, None),
        (1, None),
        (None, None),
        ('/dev/null', '/dev/null'),
        ('throwback.log', 'throwback.log'),
        ('/dev/nonexistent_dev', None),
    ]
    for inp, exp in cases:
        obs = to_logfile_opt(inp)
        yield assert_equal, exp, obs
Exemplo n.º 2
0
def test_to_logfile_opt():
    cases = [
        (True, None),
        (False, None),
        (1, None),
        (None, None),
        ('/dev/null', '/dev/null'),
        ('throwback.log', 'throwback.log'),
        ('/dev/nonexistent_dev', None),
    ]
    for inp, exp in cases:
        obs = to_logfile_opt(inp)
        yield assert_equal, exp, obs
Exemplo n.º 3
0
def test_to_logfile_opt():
    cases = [
        (True, None),
        (False, None),
        (1, None),
        (None, None),
        ('throwback.log', 'throwback.log'),
    ]
    if not ON_WINDOWS:
        cases.append(('/dev/null', '/dev/null'))
        cases.append(('/dev/nonexistent_dev', None))
    for inp, exp in cases:
        obs = to_logfile_opt(inp)
        assert exp == obs
Exemplo n.º 4
0
def test_to_logfile_opt(inp, exp):
    obs = to_logfile_opt(inp)
    assert exp == obs
Exemplo n.º 5
0
def test_to_logfile_opt(inp, exp):
    obs = to_logfile_opt(inp)
    assert exp == obs