tests/make_unit_tests.py
def makeUnitTestModule(dr, include_init=False):
    """
    Makes a unit test module for each module in a directory. It excludes
    __init__.py unless you set include_init to True.
    """
    cwd = os.getcwd()
    glob_pattn = os.path.join(dr, "*.py")
    mods = glob.glob(glob_pattn)
    
    for mod in mods:
        mod_name = os.path.split(mod)[-1]
        content = template % (mod_name, mod_name)
        ut_name = "test_%s" % mod_name
        with open(ut_name, "w") as fh:
            ut_file = fh.write(content)
        print "Wrote:", ut_name

    Makes a unit test module for each module in a directory. It excludes
    __init__.py unless you set include_init to True.
    
Makes a unit test module for each module in a directory. It excludes
init__.py unless you set include_init to True.
Makes a unit test module for each module in a directory . It excludes init__ . py unless you set include_init to True .
def makeUnitTestModule(dr, include_init=False):
    cwd = os.getcwd()
    glob_pattn = os.path.join(dr, "*.py")
    mods = glob.glob(glob_pattn)
    for mod in mods:
        mod_name = os.path.split(mod)[-1]
        content = template % (mod_name, mod_name)
        ut_name = "test_%s" % mod_name
        with open(ut_name, "w") as fh:
            ut_file = fh.write(content)
        print "Wrote:", ut_name
def makeUnitTestModule ( dr , include_init = False ) : cwd = os . getcwd ( ) glob_pattn = os . path . join ( dr , "*.py" ) mods = glob . glob ( glob_pattn ) for mod in mods : mod_name = os . path . split ( mod ) [ - 1 ] content = template % ( mod_name , mod_name ) ut_name = "test_%s" % mod_name with open ( ut_name , "w" ) as fh : ut_file = fh . write ( content ) print "Wrote:" , ut_name
Makes a unit test module for each module in a directory.
Makes a unit test module for each module in a directory .
"""
    Makes a unit test module for each module in a directory. It excludes
    __init__.py unless you set include_init to True.
    """
dr
include_init