示例#1
0
def test_run_from_cli_with_stdin(monkeypatch, config_file, tmpdir):
    with open(config_file) as f:
        stdin = StringIO(f.read())

    monkeypatch.setattr('sys.stdin', stdin)
    monkeypatch.setattr('sys.argv', ['multidl', '-n', '4', '-o', str(tmpdir)])
    main()
示例#2
0
#!/usr/bin/env python

from multidl.cli import main

if __name__ == '__main__':
    main()
示例#3
0
def test_run_from_cli_with_file(monkeypatch, config_file, tmpdir):
    monkeypatch.setattr(
        'sys.argv',
        ['multidl', '-n', '4', '-c', config_file, '-o',
         str(tmpdir)])
    main()