def setup(): global app command = CreateDistroCommand("name") command.verbose = True command.simulate = False command.options = MochOptions() command.interactive = False command.args = ["TGTest"] command.args.append("sqlalchemy=%s" % True) command.args.append("sqlobject=%s" % False) command.args.append("identity=%s" % False) print command command.templates = TurboGearsTemplate("TGTest") command.create_template( TurboGearsTemplate("TGTest"), testDataPath + "/TGTest", {"package": "TGTest", "project": "tgtest", "egg": "tgtest"}, ) command.command() here_dir = os.path.dirname(os.path.abspath(__file__)) proj_dir = testDataPath + "/TGTest" pkg_resources.working_set.add_entry(proj_dir) app = loadapp("config:development.ini", relative_to=proj_dir) app = TestApp(app)