-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Converting remaining datastore snippets to doctests #2831
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
Conversation
In the process, adding a Config.TO_DELETE runtime list so that test cleanup can handle any loose objects created.
|
I like it! |
|
Blerg! Python 2 and 3 strike again: Proposed short-term "fix": Only run snippet tests in Python 2? @jonparrott and @tseaver any better ideas? |
|
@dhermes I hate any testing dependency on repr, period (and tracebacks even worse). |
|
@tseaver Yes I'm aware of your strong opinion. Any |
|
@dhermes Either change the example not to use the repr, or change the repr not to use the "dict literal" repr of the keys / values. |
Converting remaining datastore snippets to doctests
Converting remaining datastore snippets to doctests
It's worth noting that I delegated clean-up to
system_tests/datastore.py::tearDownModule. This is because (in my experimenting) I discovered that thesphinx.ext.doctestdirectivetestcleanupdoesn't run when the thing being tested fails. (FWIW, I think it'd be fairly easy for one of us to send a PR to the Sphinx project and fix that behavior, but that was outside the scope of this PR.)To make dev a little faster I did the following:
and every time I made a change I just re-installed into the env
Might be worth turning this into a script someday? But I don't want to design it before we know how we'll use it. Just putting it here for posterity.
There is a
code-blocksnippet indatastore._httpbut that module is non-public so I left it alone.This package could use some more snippets, but for now at least they are all covered.