(log, ctx, NUM_OBJECTS, DATADIR,
BASE_NAME, DATALINECOUNT)
| 46 | |
| 47 | |
| 48 | def cod_setup_local_data(log, ctx, NUM_OBJECTS, DATADIR, |
| 49 | BASE_NAME, DATALINECOUNT): |
| 50 | objects = range(1, NUM_OBJECTS + 1) |
| 51 | for i in objects: |
| 52 | NAME = BASE_NAME + "{num}".format(num=i) |
| 53 | LOCALNAME = os.path.join(DATADIR, NAME) |
| 54 | |
| 55 | dataline = range(DATALINECOUNT) |
| 56 | fd = open(LOCALNAME, "w") |
| 57 | data = "This is the data for " + NAME + "\n" |
| 58 | for _ in dataline: |
| 59 | fd.write(data) |
| 60 | fd.close() |
| 61 | |
| 62 | |
| 63 | def cod_setup_remote_data(log, ctx, remote, NUM_OBJECTS, DATADIR, |