[TIP] mocking a file in /proc

Free Ekanayaka free at ekanayaka.io
Thu Jan 26 15:30:21 PST 2017


James Cooke <me at jamescooke.info> writes:

> Hello,
>
> That package looks really helpful - thanks for the tip Free. From
> reading the docs, its API looks simpler than pyfakefs's - hopefully I
> can try it out soon.

You're welcome. Happy to help with any issue you'll find.

Bests,

Free

>
> James
>
>
>
>
> On Tue, 24 Jan 2017, at 02:58 PM, Free Ekanayaka wrote:
>> James Cooke <me at jamescooke.info> writes:
>> 
>> > Hello,
>> >
>> >
>> >
>> > My suggestion is that you checkout pyfakefs:
>> > https://github.com/jmcgeheeiv/pyfakefs |
>> > https://pypi.python.org/pypi/pyfakefs
>> 
>> I didn't know about pyfakes.
>> 
>> FWIW systemfixtures seem to do the same:
>> 
>> http://systemfixtures.readthedocs.io/en/latest/#filesystem
>> https://github.com/testing-cabal/systemfixtures
>> 
>> The main differences I could see are:
>> 
>> 1) systemfixtures uses composition instead of inheritance, i.e. you
>>    can call self.useFixture(FakeFilesystem()) instead of inheriting
>>    from fake_filesystem_unittest.TestCase and calling
>>    self.setUpPyfakefs()
>> 
>> 2) there's no dependency on Python mock
>> 
>> Free
>
>
> -- 
> James Cooke
> Backend software developer
> CV PDF: http://jamescooke.info/docs/james_cooke_cv.pdf
> Website: http://jamescooke.info/
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python



More information about the testing-in-python mailing list