Metadata-Version: 2.1
Name: fake-module
Version: 1.0.0
Summary: Globally replace a module with a configurable fake.
Home-page: https://github.com/joellefkowitz/fake-module
Author: Joel Lefkowitz
Author-email: joellefkowitz@hotmail.com
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/joellefkowitz/fake-module/issues
Project-URL: CI, https://github.com/joellefkowitz/fake-module/actions
Project-URL: Documentation, https://fake-module.readthedocs.io/en/latest/
Project-URL: Source Code, https://github.com/joellefkowitz/fake-module
Keywords: fake,module
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: dataclasses
Requires-Dist: types-dataclasses
Provides-Extra: all
Requires-Dist: coverage ; extra == 'all'
Requires-Dist: wheel ; extra == 'all'
Requires-Dist: mypy ; extra == 'all'
Requires-Dist: bump2version ; extra == 'all'
Requires-Dist: tox ; extra == 'all'
Requires-Dist: autoflake ; extra == 'all'
Requires-Dist: bandit ; extra == 'all'
Requires-Dist: isort ; extra == 'all'
Requires-Dist: quickdocs ; extra == 'all'
Requires-Dist: pytest ; extra == 'all'
Requires-Dist: black ; extra == 'all'
Requires-Dist: pylint ; extra == 'all'
Requires-Dist: twine ; extra == 'all'
Provides-Extra: docs
Requires-Dist: quickdocs ; extra == 'docs'
Provides-Extra: formatters
Requires-Dist: autoflake ; extra == 'formatters'
Requires-Dist: black ; extra == 'formatters'
Requires-Dist: isort ; extra == 'formatters'
Provides-Extra: linters
Requires-Dist: mypy ; extra == 'linters'
Requires-Dist: pylint ; extra == 'linters'
Requires-Dist: bandit ; extra == 'linters'
Provides-Extra: publishers
Requires-Dist: twine ; extra == 'publishers'
Requires-Dist: wheel ; extra == 'publishers'
Requires-Dist: bump2version ; extra == 'publishers'
Provides-Extra: tests
Requires-Dist: tox ; extra == 'tests'
Requires-Dist: coverage ; extra == 'tests'
Requires-Dist: pytest ; extra == 'tests'

# Mock file tree

Globally replace a module with a configurable fake.

## Status

| Source     | Shields                                                                                                                                       |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Project    | ![release][release_shield] ![license][license_shield] ![lines][lines_shield] ![languages][languages_shield]                                   |
| Health     | ![codacy][codacy_shield] ![readthedocs][readthedocs_shield] ![github_review][github_review_shield] ![codacy_coverage][codacy_coverage_shield] |
| Repository | ![issues][issues_shield] ![issues_closed][issues_closed_shield] ![pulls][pulls_shield] ![pulls_closed][pulls_closed_shield]                   |
| Publishers | ![pypi][pypi_shield] ![python_versions][python_versions_shield] ![pypi_downloads][pypi_downloads_shield]                                      |
| Activity   | ![contributors][contributors_shield] ![monthly_commits][monthly_commits_shield] ![last_commit][last_commit_shield]                            |

## Installing

```bash
pip install fake-module
```

## Usage

You can purge all of a module's members inside a context manager:

```python
from fake_module import FakeModule

with FakeModule("colorsys"):
     colorsys.rgb_to_hls()

... AttributeError
```

Or create a fake globally:

```python
import colorsys
from fake_module import FakeModule

fake = FakeModule("colorsys")
fake.purge()
setattr(fake, "rgb_to_hls", 1)

colorsys.rgb_to_hls

1
```

## Tests

To run unit tests and generate a coverage report:

```bash
grunt test
```

## Documentation

This repository's documentation is hosted on [readthedocs][readthedocs].

## Tooling

To run linters:

```bash
grunt lint
```

To run formatters:

```bash
grunt format
```

## Continuous integration

This repository uses github actions to lint and test each commit. Formatting tasks and writing/generating documentation must be done before committing new code.

## Versioning

This repository adheres to semantic versioning standards.
For more information on semantic versioning visit [SemVer][semver].

Bump2version is used to version and tag changes.
For example:

```bash
bump2version patch
```

## Changelog

Please read this repository's [CHANGELOG](CHANGELOG.md) for details on changes that have been made.

## Contributing

Please read this repository's guidelines on [CONTRIBUTING](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.

## Contributors

- **Joel Lefkowitz** - _Initial work_ - [Joel Lefkowitz][author]

[![Buy Me A Coffee][coffee_button]][coffee]

## Remarks

Lots of love to the open source community!

![Be kind][be_kind]

<!-- Public links -->

[semver]: http://semver.org/

<!-- External links -->

[readthedocs]: https://fake-module.readthedocs.io/en/latest/
[coffee]: https://www.buymeacoffee.com/joellefkowitz
[coffee_button]: https://cdn.buymeacoffee.com/buttons/default-blue.png
[be_kind]: https://media.giphy.com/media/osAcIGTSyeovPq6Xph/giphy.gif

<!-- Acknowledgments -->

[author]: https://github.com/joellefkowitz

<!-- Project shields -->

[release_shield]: https://img.shields.io/github/v/tag/joellefkowitz/fake-module
[license_shield]: https://img.shields.io/github/license/joellefkowitz/fake-module
[lines_shield]: https://img.shields.io/tokei/lines/github/joellefkowitz/fake-module
[languages_shield]: https://img.shields.io/github/languages/count/joellefkowitz/fake-module

<!-- Health shields -->

[codacy_shield]: https://img.shields.io/codacy/grade/5656c08e1ca94f6da488d73fd99f1dcf
[readthedocs_shield]: https://img.shields.io/readthedocs/fake-module
[github_review_shield]: https://img.shields.io/github/workflow/status/joellefkowitz/fake-module/Review
[codacy_coverage_shield]: https://img.shields.io/codacy/coverage/5656c08e1ca94f6da488d73fd99f1dcf

<!-- Repository shields -->

[issues_shield]: https://img.shields.io/github/issues/joellefkowitz/fake-module
[issues_closed_shield]: https://img.shields.io/github/issues-closed/joellefkowitz/fake-module
[pulls_shield]: https://img.shields.io/github/issues-pr/joellefkowitz/fake-module
[pulls_closed_shield]: https://img.shields.io/github/issues-pr-closed/joellefkowitz/fake-module

<!-- Publishers shields -->

[pypi_shield]: https://img.shields.io/pypi/v/fake-module
[python_versions_shield]: https://img.shields.io/pypi/pyversions/fake-module
[pypi_downloads_shield]: https://img.shields.io/pypi/dw/fake-module

<!-- Activity shields -->

[contributors_shield]: https://img.shields.io/github/contributors/joellefkowitz/fake-module
[monthly_commits_shield]: https://img.shields.io/github/commit-activity/m/joellefkowitz/fake-module
[last_commit_shield]: https://img.shields.io/github/last-commit/joellefkowitz/fake-module


