Globally replace a module with a configurable fake.
pip install fake-moduleDocumentation and more detailed examples are hosted on Github Pages.
You can purge all of a module's members inside a context manager:
from fake_module import FakeModule
with FakeModule("colorsys"):
colorsys.rgb_to_hls()
... AttributeErrorOr create a fake globally:
import colorsys
from fake_module import FakeModule
fake = FakeModule("colorsys")
fake.purge()
setattr(fake, "rgb_to_hls", 1)
colorsys.rgb_to_hls
1To install dependencies:
yarn install
pip install .[all]To run tests:
thx testTo generate the documentation locally:
thx docsTo run linters:
thx lintTo run formatters:
thx formatPlease read this repository's Code of Conduct which outlines our collaboration standards and the Changelog for details on breaking changes that have been made.
This repository adheres to semantic versioning standards. For more information on semantic versioning visit SemVer.
Bump2version is used to version and tag changes. For example:
bump2version patch- Joel Lefkowitz - Initial work
Lots of love to the open source community!


