Skip to content

Commit

Permalink
Use testsetup/doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
erlend-aasland committed Jun 23, 2022
1 parent 9235f8d commit 8484164
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1379,11 +1379,14 @@ Adapter and Converter Recipes

This section shows recipes for common adapters and converters.

.. code-block::
.. testsetup::

import datetime
import sqlite3

.. doctest::

import datetime

def adapt_date_iso(val):
"""Adapt datetime.date to ISO 8601 date."""
return val.isoformat()
Expand Down

0 comments on commit 8484164

Please sign in to comment.