Using Python, what's the best way to create a set of files on disk for testing?
Posted
by Chris R
on Stack Overflow
See other posts from Stack Overflow
or by Chris R
Published on 2010-03-16T16:35:07Z
Indexed on
2010/03/16
18:11 UTC
Read the original article
Hit count: 286
I'm looking for a way to create a tree of test files to unit test a packaging tool. Basically, I want to create some common file system structures -- directories, nested directories, symlinks within the selected tree, symlinks outside the tree, &c.
Ideally I want to do this with as little boilerplate as possible. Of course, I could hand-write the set of files I want to see, but I'm thinking that somebody has to have automated this for a test suite somewhere. Any suggestions?
© Stack Overflow or respective owner