(togen="{0}/run/*.py".format(TEST_DIR))
regenerate the test data by running the tests on real python
regenerate the test data by running the tests on real python
regenerate the test data by running the tests on real python
def regenruntests(togen="{0}/run/*.py".format(TEST_DIR)):
    """regenerate the test data by running the tests on real python"""
    for f in glob.glob(togen):
        os.system("python {0} > {1}.real 2>&1".format(f, f))
        forcename = f + ".real.force"
        if os.path.exists(forcename):
            shutil.copy(forcename, "%s.real" % f)
        if crlfprog:
            os.system("python %s %s.real" % (crlfprog, f))
    for f in glob.glob("{0}/interactive/*.py".format(TEST_DIR)):
        p = Popen("python -i > %s.real 2>%s" % (f, nul), shell=True, stdin=PIPE)
        p.communicate(open(f).read() + "\004")
        forcename = f + ".real.force"
        if os.path.exists(forcename):
            shutil.copy(forcename, "%s.real" % f)
        if crlfprog:
            os.system("python %s %s.real" % (crlfprog, f))
def regenruntests ( togen = "{0}/run/*.py" . format ( TEST_DIR ) ) : for f in glob . glob ( togen ) : os . system ( "python {0} > {1}.real 2>&1" . format ( f , f ) ) forcename = f + ".real.force" if os . path . exists ( forcename ) : shutil . copy ( forcename , "%s.real" % f ) if crlfprog : os . system ( "python %s %s.real" % ( crlfprog , f ) ) for f in glob . glob ( "{0}/interactive/*.py" . format ( TEST_DIR ) ) : p = Popen ( "python -i > %s.real 2>%s" % ( f , nul ) , shell = True , stdin = PIPE ) p . communicate ( open ( f ) . read ( ) + "\004" ) forcename = f + ".real.force" if os . path . exists ( forcename ) : shutil . copy ( forcename , "%s.real" % f ) if crlfprog : os . system ( "python %s %s.real" % ( crlfprog , f ) )