"Virtual" file system mock object - replacing stuff in __builtins__
Ralf Muschall
ralf at tecont.de
Mon Mar 8 17:31:23 EST 2004
llothar at web.de (Lothar Scholz) writes:
> Setup a test directory with data files and in the setUp method copy
> the items from the directory to a temporary directory. Do the tests
> with the temporary directory and remove it in the tearDown method.
> This is the simplest case to avoid strange effects.
It might fail in two cases that come to my mind:
1. "/lost/file1.mp3": ((33188, 884738L, 774L, 1, 0, 0, 1463L,
1054331223, 991209287, 1054333751), "File content"),
being replaced by
"/lost/file1.iso": ((33188, 884738L, 774L, 1, 0, 0, 2147483648L,
1054331223, 991209287, 1054333751), "File content"),
(with stat(thingy)[6] being the size)
2. if absolute pathnames are relevant (e.g. for OS administration).
Ralf
--
GS d->? s:++>+++ a+ C++++ UL+++ UH++ P++ L++ E+++ W- N++ o-- K- w--- !O M- V-
PS+>++ PE Y+>++ PGP+ !t !5 !X !R !tv b+++ DI+++ D? G+ e++++ h+ r? y?
More information about the Python-list
mailing list