Skip to content

Please show the canonical way to switch between test and production #22

Description

@GoogleCodeExporter
Thank you for pyfakefs.

I want to start out from the beginning using pyfakefs the right way.  Please 
show us how to:

* Use pyfakefs during tests
* Not use pyfakefs in production

The *_test.py tests are of course very informative, but they are always in test 
mode.  They do not have a production mode that uses the real file system.

That issue of Testing on the Toilet that introduced pyfakefs would be great.  
Even sample source code somewhere on the net would be sufficient.

I would be using the latest version applicable to Python 2.7.

Stackoverflow issue 
http://stackoverflow.com/questions/16468443/how-to-replace-file-access-reference
s-for-a-module-under-test asks this same question.

Original issue reported on code.google.com by jmcgehe...@gmail.com on 1 Oct 2013 at 10:57

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions