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

Make sure all sqlite3 doc examples work #95432

Closed
erlend-aasland opened this issue Jul 29, 2022 · 4 comments · Fixed by #96193 or #96225
Closed

Make sure all sqlite3 doc examples work #95432

erlend-aasland opened this issue Jul 29, 2022 · 4 comments · Fixed by #96193 or #96225
Labels
docs Documentation in the Doc dir topic-sqlite3 triaged The issue has been accepted as valid by a triager.

Comments

@erlend-aasland
Copy link
Contributor

Use Sphinx doctest features to ensure that all examples in the sqlite3 docs work as expected.

See also: https://diataxis.fr/tutorials/#ensure-that-the-tutorial-works-reliably

@erlend-aasland erlend-aasland added docs Documentation in the Doc dir topic-sqlite3 triaged The issue has been accepted as valid by a triager. labels Jul 29, 2022
erlend-aasland added a commit that referenced this issue Jul 29, 2022
- the insert statement should have five placeholders, not four
- missing ... in the multiline row list
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 29, 2022
- the insert statement should have five placeholders, not four
- missing ... in the multiline row list
(cherry picked from commit 2fbee85)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 29, 2022
- the insert statement should have five placeholders, not four
- missing ... in the multiline row list
(cherry picked from commit 2fbee85)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
miss-islington added a commit that referenced this issue Jul 29, 2022
- the insert statement should have five placeholders, not four
- missing ... in the multiline row list
(cherry picked from commit 2fbee85)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
miss-islington added a commit that referenced this issue Jul 29, 2022
- the insert statement should have five placeholders, not four
- missing ... in the multiline row list
(cherry picked from commit 2fbee85)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Aug 22, 2022
@erlend-aasland
Copy link
Contributor Author

PR for the tutorial is up. I'll create a new PR for the rest later.

@CAM-Gerlach, @hugovk: does Sphinx support doctesting included files?

@CAM-Gerlach
Copy link
Member

I actually know fairly little about docttests since I don't use them much myself (I primarily maintain docs for the Spyder-family GUI projects, where doctests aren't really relevant or practical), and most of what I know on Sphinx's support for them comes from reading the Sphinx documentation, which doesn't seem to mention this.

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 23, 2022
(cherry picked from commit 04c73e5)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 23, 2022
(cherry picked from commit 04c73e5)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
miss-islington added a commit that referenced this issue Aug 23, 2022
(cherry picked from commit 04c73e5)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
miss-islington added a commit that referenced this issue Aug 23, 2022
(cherry picked from commit 04c73e5)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Aug 24, 2022
As a consequence of the added test, this commit also includes
fixes for broken examples.
@erlend-aasland
Copy link
Contributor Author

The literal includes are not tested. This is unfortunate. For sqlite3, I suggest inlining them; most of the snippets are very short. We can exploit this opportunity to make them even more succinct.

mdboom pushed a commit to mdboom/cpython that referenced this issue Aug 24, 2022
vsajip pushed a commit to vsajip/cpython that referenced this issue Aug 29, 2022
As a consequence of the added test, this commit also includes
fixes for broken examples.

- Add separate namespace for trace tests bco. module level callback
- Move more backup and cursor examples under separate namespaces
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 29, 2022
As a consequence of the added test, this commit also includes
fixes for broken examples.

- Add separate namespace for trace tests bco. module level callback
- Move more backup and cursor examples under separate namespaces
(cherry picked from commit bf92597)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Aug 29, 2022
)

As a consequence of the added test, this commit also includes
fixes for broken examples.

- Add separate namespace for trace tests bco. module level callback
- Move more backup and cursor examples under separate namespaces.
(cherry picked from commit bf92597)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
miss-islington added a commit that referenced this issue Aug 29, 2022
As a consequence of the added test, this commit also includes
fixes for broken examples.

- Add separate namespace for trace tests bco. module level callback
- Move more backup and cursor examples under separate namespaces
(cherry picked from commit bf92597)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
erlend-aasland added a commit that referenced this issue Aug 29, 2022
As a consequence of the added test, this commit also includes
fixes for broken examples.

- Add separate namespace for trace tests bco. module level callback
- Move more backup and cursor examples under separate namespaces.
(cherry picked from commit bf92597)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir topic-sqlite3 triaged The issue has been accepted as valid by a triager.
Projects
Status: Done
2 participants