def fxnewfile(): # new file newfile = os.path.join(get_data_dir(), 'kr/node-3/log', 'game_2014-03-05 04.log') if os.path.isfile(newfile): os.unlink(newfile) yield newfile if os.path.isfile(newfile): os.unlink(newfile) # reload file infor for following tests from ws_mysol.myprj import log as l l.load_info()
def fxlogs(): from wzdat.util import gen_dummydata ddir = cfg['data_dir'] # remove previous dummy data import shutil shutil.rmtree(ddir) # generate new dummy data gen_dummydata(ddir) from ws_mysol.myprj import log log.load_info() from ws_mysol.myprj import exlog exlog.load_info() from ws_mysol.myprj import dump dump.load_info() yield log, exlog, dump