Exemplo n.º 1
0
def test_get_opening_lzma():
    opener = reican.get_opener(test_file_name + ".lzma", stats)
    with opener("test/test.log.lzma") as logfile:
        assert len(logfile.readlines()) == 3
Exemplo n.º 2
0
def test_get_opener_lzma_type():
    opener = reican.get_opener(test_file_name + ".lzma", stats)
    assert isinstance(opener, types.FunctionType)
Exemplo n.º 3
0
def test_opening_plaintext():
    opener = reican.get_opener(test_file_name, stats)
    with opener("test/test.log") as logfile:
        assert len(logfile.readlines()) == 3
Exemplo n.º 4
0
def test_get_opener_type():
    opener = reican.get_opener(test_file_name, stats)
    assert isinstance(opener, types.BuiltinFunctionType)