Has anyone released a Python "mock filesystem" for automated testing?

Fábio Mendes niels_bohr at uol.com.br
Sat Nov 6 01:17:29 EST 2004


Em Qui, 2004-11-04 às 21:31 -0500, Peter Hansen escreveu:
> The term "mock filesystem" refers to code allowing unit
> or acceptance tests to create, read and write, and manipulate
> in other ways "virtual" files, without any actual disk
> access.  Everything is held in memory and therefore fast,
> without risk of damaging real files, and with none of the
> messiness of leftover files after testing.

Maybe StringIO is a good start point. Depending on what you need (if
it's just read/write), everything is already there. 

Fabio



More information about the Python-list mailing list