gh-100450: Add sqlite.Row.__contains__
method by sobolevn · Pull Request #100457 · python/cpython (original) (raw)
I've added two doctests, aren't they enough? If not, I don't know what is the best place for these tests.
The doctests are there to make sure the examples in the docs actually work; it is not the place for unit tests. The unit tests (and regression tests, functional tests, etc.) all live in Lib/test/test_sqlite3
. Their purpose is to test the _sqlite
extension module (and the sqlite3
module) in all possible ways; we aim for as high code coverage as possible.
If I want to check the code coverage of the _sqlite
C code, I can do so easily with a couple of compiler/linker flags, running ./python.exe -m test test_sqlite3
, and generate a report.
Also, I'm not sure the buildbots run doctests; IIRC, they only run the test suite, but I might be wrong about this.