コード例 #1
0
ファイル: test_results.py プロジェクト: jsh/bitarray_mutants
def run_empty():
    '''Create and run nfiles empty mutants.
    Save results in empty.results.
    '''
    outfile = 'empty.results'
    mutants = get_test_dir('empty.mutants')
    os.chdir(mutants)
    make_mutants(nfiles, wt=wild_type, mutagen=mutate.empty)
    os.chdir('..')
    run_dir(mutants, outfile)
コード例 #2
0
def run_screen(mutation='point', mutagen=mutate.point, direction='+'):
    '''generate mutants, record results'''
    results = mutation + '.results'
    test_dir = get_test_dir(mutation + '.mutants')
    os.chdir(test_dir)
    make_mutants(nfiles, lim=lim, mode='list',
                 loci=test_loci, wt=wild_type,
                 mutagen=mutagen, direction=direction)
    os.chdir('..')
    run_dir(test_dir, results)
    assert os.path.isfile(results)
    with open(results, 'r') as f:
        assert len(list(f)) == nfiles
コード例 #3
0
def run_point():
    results = 'point.results'
    test_dir = get_test_dir('point.mutants')
    os.chdir(test_dir)
    make_mutants(nfiles,
                 lim=2 * nfiles,
                 mode='random',
                 wt=wild_type,
                 mutation=mutate.point)
    os.chdir('..')
    run_dir(test_dir, results)
    assert os.path.isfile(results)
    with open(results, 'r') as f:
        assert len(list(f)) == nfiles