Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use doctest module to verify examples in README.md #262

Merged
merged 4 commits into from Nov 16, 2020
Merged

Conversation

brainix
Copy link
Owner

@brainix brainix commented Nov 16, 2020

Locally, I'm testing README.md like this:

$ source venv/bin/activate; python3 -m doctest -v README.md; deactivate

Locally, I'm testing `README.md` like this:

    $ source venv/bin/activate; python3 -m doctest -v README.md; deactivate
`$ make readme` cleans up Redis, runs the doctests, then cleans up Redis
again.  This way, I don't have to pollute `README.md` with Redis cleanup
commands.
@brainix
Copy link
Owner Author

brainix commented Nov 16, 2020

As of the last commit, we can test the code examples in README.md with: $ make readme. This Makefile target cleans up Redis, runs the doctests, then cleans up Redis again. 🎉

1. Indicate number of Redis keys deleted (when cleaning up)
2. Reduce verbosity of tests (only print failures)
@brainix
Copy link
Owner Author

brainix commented Nov 16, 2020

🐟

@brainix brainix merged commit 1b4a127 into master Nov 16, 2020
@brainix brainix deleted the readme-doctests branch November 16, 2020 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant