Home
last modified time | relevance | path

Searched full:doctest (Results 1 – 25 of 204) sorted by relevance

123456789

/third_party/python/Lib/test/
Dtest_doctest.py2 Test script for doctest.
8 import doctest
201 >>> example = doctest.Example('print(1)', '1\n')
211 >>> example = doctest.Example('[].pop()', '', exc_msg,
213 ... options={doctest.ELLIPSIS: True})
221 >>> e = doctest.Example('print(1)', '1\n')
225 >>> e = doctest.Example('print(1)\n', '1\n')
230 >>> e = doctest.Example('print(1);\nprint(2)\n', '1\n2\n')
234 >>> e = doctest.Example('print(1);\nprint(2)', '1\n2\n')
239 >>> e = doctest.Example('', '')
[all …]
Dtest_pdb.py3 import doctest
18 # This little helper class is essential for testing pdb under doctest.
54 > <doctest test.test_pdb.test_pdb_displayhook[0]>(3)test_function()
96 >>> with PdbTestInput([ # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
121 > <doctest test.test_pdb.test_pdb_basic_commands[3]>(3)test_function()
125 > <doctest test.test_pdb.test_pdb_basic_commands[0]>(1)test_function_2()
144 <doctest test.test_pdb.test_pdb_basic_commands[4]>(25)<module>()
146 <doctest test.test_pdb.test_pdb_basic_commands[3]>(3)test_function()
148 > <doctest test.test_pdb.test_pdb_basic_commands[0]>(1)test_function_2()
151 > <doctest test.test_pdb.test_pdb_basic_commands[3]>(3)test_function()
[all …]
Dtest_zipimport_support.py12 import doctest
25 # doctest (Issue 4197)
37 finder = doctest.DocTestFinder(verbose=verbose, recurse=False)
38 runner = doctest.DocTestRunner(verbose=verbose)
51 print ('doctest (%s) ... %d tests with zero failures' % (module.__name__, t))
96 # To avoid having to keep two copies of the doctest module's
109 # The sample doctest files rewritten to include in the zipped version.
138 # which aren't available to the zipped version (the doctest
142 # doctest could really use some APIs which take a text
192 import doctest
[all …]
Dtest_unpack_ex.py3 import doctest
318 >>> a, *b, c, *d, e = range(10) # doctest:+ELLIPSIS
323 >>> [*b, *c] = range(10) # doctest:+ELLIPSIS
328 >>> a,*b,*c,*d = range(4) # doctest:+ELLIPSIS
333 >>> *a = range(10) # doctest:+ELLIPSIS
338 >>> *a # doctest:+ELLIPSIS
343 >>> *1 # doctest:+ELLIPSIS
348 >>> x = *a # doctest:+ELLIPSIS
353 >>> (*x),y = 1, 2 # doctest:+ELLIPSIS
358 >>> (((*x))),y = 1, 2 # doctest:+ELLIPSIS
[all …]
Dsample_doctest_no_doctests.py1 """This is a sample module used for testing doctest.
3 This module is for testing how doctest handles a module with docstrings
4 but no doctest examples.
10 """A docstring with no doctest examples.
Dtest_doctest2.py1 """A module to test whether doctest recognizes some 2.2 features,
112 import doctest, sys
114 f, t = doctest.testmod(sys.modules[__name__])
123 from doctest import *
/third_party/python/Doc/library/
Ddoctest.rst1 :mod:`doctest` --- Test interactive Python examples
4 .. module:: doctest
12 **Source code:** :source:`Lib/doctest.py`
16 The :mod:`doctest` module searches for pieces of text that look like interactive
18 exactly as shown. There are several common ways to use doctest:
85 import doctest
86 doctest.testmod()
88 If you run :file:`example.py` directly from the command line, :mod:`doctest`
97 ``-v`` to the script, and :mod:`doctest` prints a detailed log of what
133 That's all you need to know to start making productive use of :mod:`doctest`!
[all …]
Dimportlib.metadata.rst85 >>> from importlib.metadata import version # doctest: +SKIP
86 >>> version('wheel') # doctest: +SKIP
95 >>> list(metadata('wheel')) # doctest: +SKIP
123 >>> eps = entry_points() # doctest: +SKIP
129 >>> sorted(eps.groups) # doctest: +SKIP
136 >>> scripts = eps.select(group='console_scripts') # doctest: +SKIP
141 >>> scripts = entry_points(group='console_scripts') # doctest: +SKIP
145 >>> 'wheel' in scripts.names # doctest: +SKIP
147 >>> wheel = scripts['wheel'] # doctest: +SKIP
151 >>> (wheel,) = entry_points(group='console_scripts', name='wheel') # doctest: +SKIP
[all …]
Dtraceback.rst498 File "<doctest...>", line 10, in <module>
502 File "<doctest...>", line 10, in <module>
504 File "<doctest...>", line 4, in lumberjack
509 File "<doctest...>", line 10, in <module>
511 File "<doctest...>", line 4, in lumberjack
519 ' File "<doctest default[0]>", line 10, in <module>\n lumberjack()\n',
520 ' File "<doctest default[0]>", line 4, in lumberjack\n bright_side_of_life()\n',
521 …' File "<doctest default[0]>", line 7, in bright_side_of_life\n return tuple()[0]\n …
524 [<FrameSummary file <doctest...>, line 10 in <module>>,
525 <FrameSummary file <doctest...>, line 4 in lumberjack>,
[all …]
Dstatistics.rst17 __name__ = '<doctest>'
131 .. doctest::
169 .. doctest::
178 .. doctest::
209 .. doctest::
235 .. doctest::
244 .. doctest::
271 .. doctest::
279 .. doctest::
300 .. doctest::
[all …]
Dturtle.rst252 .. doctest::
274 .. doctest::
279 .. doctest::
298 .. doctest::
304 .. doctest::
323 .. doctest::
329 .. doctest::
352 .. doctest::
358 .. doctest::
382 .. doctest::
[all …]
Dast.rst159 .. doctest::
191 .. doctest::
221 .. doctest::
245 .. doctest::
266 .. doctest::
296 .. doctest::
329 .. doctest::
357 .. doctest::
383 .. doctest::
397 .. doctest::
[all …]
Dsecrets.rst14 __name__ = '<doctest>'
71 .. doctest::
73 >>> token_bytes(16) #doctest:+SKIP
83 .. doctest::
85 >>> token_hex(16) #doctest:+SKIP
95 .. doctest::
97 >>> token_urlsafe(16) #doctest:+SKIP
/third_party/python/Lib/
Ddoctest.py1 # Module doctest.
9 r"""Module doctest -- a framework for running examples in docstrings.
14 import doctest
15 doctest.testmod()
44 of doctest's default behaviors. See the Library Reference Manual for
67 # 2. Example & DocTest
69 'DocTest',
70 # 3. Doctest Parser
72 # 4. Doctest Finder
74 # 5. Doctest Runner
[all …]
Dsecrets.py40 >>> token_bytes(16) #doctest:+SKIP
55 >>> token_hex(16) #doctest:+SKIP
67 >>> token_urlsafe(16) #doctest:+SKIP
/third_party/json/tests/thirdparty/doctest/
Ddoctest_compatibility.h5 …_LOCAL // enable single-threaded builds on XCode 6/7 - https://github.com/onqtam/doctest/issues/172
6 #include "doctest.h"
8 // Catch doesn't require a semicolon after CAPTURE but doctest does
12 // Sections from Catch are called Subcases in doctest and don't work with std::string by default
20 // doctest doesn't support THROWS_WITH for std::string out of the box (has to include <string>...)
35 using doctest::Approx;
Ddoctest.h5 // doctest.h - the lightest feature-rich C++ single-header testing framework for unit tests and TDD
14 // https://github.com/doctest/doctest/blob/master/doc/markdown/readme.md
446 namespace doctest { namespace detail {
452 … static const int var = doctest::detail::consume(&var, __VA_ARGS__); \
496 // https://github.com/doctest/doctest/issues/126
497 // https://github.com/doctest/doctest/issues/356
541 // see this issue on why this is needed: https://github.com/doctest/doctest/issues/183
558 namespace doctest {
1031 …static DOCTEST_CONSTEXPR bool value = detail::types::is_enum<T>::value && !doctest::detail::has_in…
1095 String ret = __FUNCSIG__; // class doctest::String __cdecl doctest::toString<TYPE>(void)
[all …]
/third_party/python/Doc/howto/
Dsorting.rst23 .. doctest::
33 .. doctest::
43 .. doctest::
57 .. doctest::
70 .. doctest::
82 .. doctest::
110 .. doctest::
123 .. doctest::
138 .. doctest::
153 .. doctest::
[all …]
/third_party/jerryscript/tools/
Dgen-doctest.py35 :param dry: if True, don't create the doctest files but print the file
57 Process a doctest declaration (`[doctest]: # (name="test.c", ...)`).
87 :return: a tuple of a list (of the first line(s) of the doctest) and the
97 :param code: the list of lines of the doctest.
123 decl_match = re.match(r'^\[doctest\]:\s+#\s+\((.*)\)\s*$', line)
156 parser = argparse.ArgumentParser(description='Markdown doctest extractor', epilog="""
160 `[doctest]: # (name="test.c", ...)`. For now, two parameters are valid:
/third_party/python/Lib/ctypes/test/
Dtest_objects.py44 >>> print(x.array._b_base_) # doctest: +ELLIPSIS
57 import unittest, doctest
63 failures, tests = doctest.testmod(ctypes.test.test_objects)
67 doctest.testmod(ctypes.test.test_objects)
/third_party/skia/third_party/externals/swiftshader/third_party/subzero/docs/
DMakefile.sphinx23 epub latex latexpdf text man changes linkcheck doctest gettext
49 @echo " doctest to run all doctests embedded in the"
161 doctest:
162 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
164 "results in $(BUILDDIR)/doctest/output.txt."
/third_party/jerryscript/tests/unit-doc/
DCMakeLists.txt19 set(GEN_DOCTEST "${CMAKE_SOURCE_DIR}/tools/gen-doctest.py")
27 # Dry run of the doctest generator: analyze MarkDown files and get the list of
36 message(FATAL_ERROR "failed to get doctest file list")
39 # Process the output of the doctest generator: collect sources that must be
67 # Add custom command to run doctest generator if any of the MarkDown sources
/third_party/jerryscript/docs/
D07.DEBUGGER.md130 [doctest]: # (test="link")
170 [doctest]: # (test="link")
212 [doctest]: # (test="link")
254 [doctest]: # (test="link")
299 [doctest]: # (test="link")
386 [doctest]: # (test="link")
423 [doctest]: # (test="link")
/third_party/nghttp2/doc/
Dmake.bat33 echo. doctest to run all doctests embedded in the documentation if enabled
161 if "%1" == "doctest" (
162 %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
166 results in %BUILDDIR%/doctest/output.txt.
/third_party/libabigail/doc/manuals/
DMakefile.am34 … pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
56 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
164 doctest: target
165 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
167 "results in $(BUILDDIR)/doctest/output.txt."

123456789