[TIP] virtual filesystem

Jonathan Lange jml at mumak.net
Thu Dec 8 02:37:54 PST 2011


On Wed, Dec 7, 2011 at 7:51 PM, Barry Warsaw <barry at python.org> wrote:
> On Dec 07, 2011, at 04:30 PM, Jonathan Lange wrote:
>
>>bzrlib[1] takes the approach of abstracting out the filesystem using
>>what it calls "Transports". It's not really the filesystem, it's
>>actually also for FTP, HTTP etc. Anyway, they have a MemoryTransport,
>>which never actually hits disk at all, and is great for testing. I've
>>found myself using this from bzrlib in other projects.
>>
>>They prevent interface skew by having one set of tests that run
>>against every transport implementation. Whenever they discover some
>>buggy behaviour variance, they add tests to this "interface suite".
>
> Sound like it could make a good candidate for refactoring out into a separate
> library. <wink>
>

Preaching to the choir.

jml



More information about the testing-in-python mailing list