summaryrefslogtreecommitdiff
path: root/docs/faq.rst
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2022-08-02 13:46:50 +0300
committerJulian Berman <Julian@GrayVines.com>2022-08-02 13:46:50 +0300
commit60bb7b49bf62c0e180e0f1072d034b1a021b9be7 (patch)
tree408cf49124e5cd37c32df47dc3b4b2ac813a78a5 /docs/faq.rst
parent6f18518ebc5855876aab846183c80372e454ac94 (diff)
downloadjsonschema-60bb7b49bf62c0e180e0f1072d034b1a021b9be7.tar.gz
(Re-)enable more doctests.
It is way too easy to silently pass these :( -- specifically, the doctest directive only works for things with >>> prompts.
Diffstat (limited to 'docs/faq.rst')
-rw-r--r--docs/faq.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/faq.rst b/docs/faq.rst
index bddb93a..3bbed31 100644
--- a/docs/faq.rst
+++ b/docs/faq.rst
@@ -150,7 +150,7 @@ this code, we add the default properties to each object *before* the
properties are validated, so the default values themselves will need to
be valid under the schema.)
- .. code-block:: python
+ .. testcode::
from jsonschema import Draft7Validator, validators
@@ -205,7 +205,7 @@ defaults.
all of its properties, but only if your schema provides a default
value for the object itself, like so:
- .. code-block:: python
+ .. testcode::
schema = {
"type": "object",
@@ -231,7 +231,7 @@ defaults.
it won't be instantiated at all, much less populated with default
properties.
- .. code-block:: python
+ .. testcode::
del schema["properties"]["outer-object"]["default"]
obj2 = {}