Skip to content

Commit 5249fb7

Browse files
committed
Fix doctests
1 parent 60c6d82 commit 5249fb7

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

docs/data.rst

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -180,22 +180,25 @@ returns a new strategy for it. So for example:
180180
>>> json = recursive(none() | booleans() | floats() | text(printable),
181181
... lambda children: lists(children) | dictionaries(text(printable), children))
182182
>>> pprint(json.example())
183-
[['P'],
184-
[None,
185-
True,
186-
-inf,
187-
5.5477328279826776e+16,
188-
True,
189-
None,
190-
-0.3333333333333333,
191-
-1.7093843795721067e-100,
192-
False,
193-
'94K~{mY>a1yA:#CmDYb',
194-
None],
195-
[None, 8.628035772152501e-162, None],
196-
False]
183+
['dy',
184+
[None, True, 6.297399055778002e+16, False],
185+
{'a{h\\:694K~{mY>a1yA:#CmDYb': None},
186+
'\\kP!4',
187+
{'#1J1': '',
188+
'cx.': None,
189+
"jv'A?qyp_sB\n$62g": [],
190+
'qgnP': [False, -inf, 'la)']},
191+
[],
192+
{}]
197193
>>> pprint(json.example())
198-
{'': [True]}
194+
{'': None,
195+
'(Rt)': 1.192092896e-07,
196+
',': [],
197+
'6': 2.2250738585072014e-308,
198+
'HA=/': [],
199+
'YU]gy8': inf,
200+
'l': None,
201+
'nK': False}
199202
>>> pprint(json.example())
200203
[]
201204

@@ -211,7 +214,7 @@ we wanted to only generate really small JSON we could do this as:
211214
>>> small_lists.example()
212215
[False]
213216
>>> small_lists.example()
214-
[True, True]
217+
True
215218
>>> small_lists.example()
216219
[]
217220

0 commit comments

Comments
 (0)