adding a copytree function to the testing framework

This commit is contained in:
Martin A. Brown 2016-04-02 11:59:29 -07:00
parent 6ec7e84c2d
commit 2913600928
1 changed files with 4 additions and 0 deletions

View File

@ -134,6 +134,10 @@ class TestSourceDocSkeleton(object):
os.mkdir(self.dirname)
self.md5s = dict()
def copytree(self, source):
dst = opj(self.dirname, opb(source))
shutil.copytree(source, dst)
def create_stale(self, fname):
l = list(self.md5s[fname])
random.shuffle(l)