예제 #1
0
def update_7(db, filename_persist):
    """add new tests"""
    text = """
        test/test_schedule_interval.py : new, svn add done
        test/test_aspect_ratio_on_resize.py : new, svn add done
        """
    candidates = doers.scripts_names_from_text(text, end_mark=":")
    hl.add_entities(db, filename_persist, candidates)
    db.history_add("added tests", text)
    dbm.db_save(db, filename_persist)
예제 #2
0
파일: recon.py 프로젝트: xuxiandi/cocos
snapshots_reference_dir = '../../test/ref'
# dir for some helper tasks
samples_dir = '../../test/saux'

clean = True
if clean:
    # updates commented out were used in the initial buildup, there are no
    # longer neccesary in a clean build but are keep (comented out) to
    # hint possible opers. Maintenace will need some of them.
    db = hl.new_db(filename_persist)
    hl.new_testbed(db, testbed, basepath)

    # add all scripts test_*.py as entities
    all_test_files = doers.files_from_dir('../../test', fn_fname_test_py)
    canonical_names = hl.canonical_names_from_filenames(db, all_test_files)
    hl.add_entities(db, filename_persist, canonical_names)
    candidates, unknowns = hl.get_scripts(db, 'all')
    assert len(unknowns) == 0
    assert candidates == set(canonical_names)

    # scan candidates to get info needed by update snapshots
    scripts, unknowns = hl.update_scanprops(db, filename_persist, candidates)
    assert scripts == candidates

    # select snapshot candidates
    candidates, unknowns = hl.get_scripts(db, 'testinfo_valid')
    assert len(unknowns) == 0

    # do snapshots
    scripts, unknowns = hl.update_snapshots(db, filename_persist, candidates,
                                            snapshots_dir)
예제 #3
0
snapshots_reference_dir = '../../test/ref'
# dir for some helper tasks
samples_dir = '../../test/saux'

clean = True
if clean:
    # updates commented out were used in the initial buildup, there are no
    # longer neccesary in a clean build but are keep (comented out) to
    # hint possible opers. Maintenace will need some of them.
    db = hl.new_db(filename_persist)
    hl.new_testbed(db, testbed, basepath)

    # add all scripts test_*.py as entities
    all_test_files = doers.files_from_dir('../../test', fn_fname_test_py)
    canonical_names = hl.canonical_names_from_filenames(db, all_test_files)
    hl.add_entities(db, filename_persist, canonical_names)
    candidates, unknowns = hl.get_scripts(db, 'all')
    assert len(unknowns)==0
    assert candidates == set(canonical_names)
    
    # scan candidates to get info needed by update snapshots
    scripts, unknowns = hl.update_scanprops(db, filename_persist, candidates)
    assert scripts==candidates

    # select snapshot candidates
    candidates, unknowns = hl.get_scripts(db, 'testinfo_valid')
    assert len(unknowns)==0

    # do snapshots
    scripts, unknowns = hl.update_snapshots(db, filename_persist, candidates,
                                            snapshots_dir)