Beispiel #1
0
def check_main_from_file(cmd, fasta, expected, in_fa_file, capsys):
    in_fa_file.write(fasta)
    argv = ['prog', cmd, str(in_fa_file)]
    mod.main(argv)
    out, err = capsys.readouterr()
    if expected != out:
        print(out)
    assert (out == expected)
Beispiel #2
0
def check_main_from_stdin(cmd, fasta, expected, capsys):
    mod.sys.stdin = io.StringIO(fasta)
    argv = ['prog', cmd, '-']
    mod.main(argv)
    out, err = capsys.readouterr()
    if expected != out:
        print(out)
    assert (out == expected)
Beispiel #3
0
def check_main_from_stdin(cmd, fasta, expected, capsys):
    mod.sys.stdin = cStringIO.StringIO(fasta)
    argv = ['prog', cmd, '-']
    mod.main(argv)
    out, err = capsys.readouterr()
    if expected != out:
        print(out)
    assert(out == expected)
Beispiel #4
0
def check_main_from_file(cmd, fasta, expected, in_fa_file, capsys):
    in_fa_file.write(fasta)
    argv = ['prog', cmd, str(in_fa_file)]
    mod.main(argv)
    out, err = capsys.readouterr()
    if expected != out:
        print(out)
    assert(out == expected)
Beispiel #5
0
def check_main_from_stdin_with_whitelist(cmd, fasta, expected,
                                         in_whitelist_file, capsys):
    mod.sys.stdin = io.StringIO(fasta)
    argv = ['prog', '--zmw-whitelist-fn', in_whitelist_file, cmd, '-']
    mod.main(argv)
    out, err = capsys.readouterr()
    if expected != out:
        print(out)
    assert (out == expected)
Beispiel #6
0
def check_main_from_file_with_whitelist(cmd, fasta, expected,
                                        in_whitelist_file, in_fa_file, capsys):
    in_fa_file.write(fasta)
    argv = [
        'prog', '--zmw-whitelist-fn', in_whitelist_file, cmd,
        str(in_fa_file)
    ]
    mod.main(argv)
    out, err = capsys.readouterr()
    if expected != out:
        print(out)
    assert (out == expected)
Beispiel #7
0
def test_help():
    try:
        mod.main(['prog', '--help'])
    except SystemExit:
        pass
Beispiel #8
0
def test_help():
    try:
        mod.main(['prog', '--help'])
    except SystemExit:
        pass