예제 #1
0
def test_list_noextra(tmpdir):
    test_mar = tmpdir.join('test.mar')

    tmpdir.join('hello.txt').write('hello world')
    tmpdir.join('hello.txt').chmod(0o666)
    with tmpdir.as_cwd():
        cli.do_create(str(test_mar), ['hello.txt'], None)

    lines = list(cli.do_list(str(test_mar)))
    assert lines == [
        'SIZE    MODE    NAME   ',
        '11      0666    hello.txt',
    ]
예제 #2
0
def test_list_noextra(tmpdir):
    test_mar = tmpdir.join('test.mar')

    tmpdir.join('hello.txt').write('hello world')
    tmpdir.join('hello.txt').chmod(0o666)
    with tmpdir.as_cwd():
        cli.do_create(str(test_mar), ['hello.txt'], None)

    lines = list(cli.do_list(str(test_mar)))
    assert lines == [
        'SIZE    MODE    NAME   ',
        '11      0666    hello.txt',
    ]
예제 #3
0
def test_create(tmpdir):
    test_mar = tmpdir.join('test.mar')

    tmpdir.join('hello.txt').write('hello world')
    files = [str(tmpdir.join('hello.txt'))]
    cli.do_create(str(test_mar), files, 'bz2')
예제 #4
0
def test_create(tmpdir):
    test_mar = tmpdir.join('test.mar')

    tmpdir.join('hello.txt').write('hello world')
    files = [str(tmpdir.join('hello.txt'))]
    cli.do_create(str(test_mar), files, 'bz2')