Exemplo n.º 1
0
def test_file_size():
    counts = (len(text), len(text) + text.count("\n"))
    with filetext(text) as fn:
        assert file_size(fn) in counts
    with filetext(text.encode(), open=gzip.open) as fn:
        assert file_size(fn, "gzip") in counts
Exemplo n.º 2
0
def test_file_size():
    counts = (len(text), len(text) + text.count('\n'))
    with filetext(text) as fn:
        assert file_size(fn) in counts
    with filetext(text.encode(), open=gzip.open) as fn:
        assert file_size(fn, 'gzip') in counts
Exemplo n.º 3
0
def test_file_size():
    counts = (len(text), len(text) + text.count('\n'))
    with filetext(text) as fn:
        assert file_size(fn) in counts
    with filetext(text.encode(), open=GzipFile) as fn:
        assert file_size(fn, 'gzip') in counts