Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Python 3.11.3

Contenu du module « doctest »

Liste des classes du module doctest

Nom de la classe Description
DebugRunner Run doc tests but raise an exception as soon as there is a failure. [extrait de DebugRunner.__doc__]
DocFileCase
DocTest
DocTestCase
DocTestFinder
DocTestParser
DocTestRunner
Example
IncrementalNewlineDecoder Codec used when reading a file in universal newlines mode. [extrait de IncrementalNewlineDecoder.__doc__]
OutputChecker
SkipDocTestCase
StringIO Text I/O implementation using an in-memory buffer. [extrait de StringIO.__doc__]
TestResults TestResults(failed, attempted) [extrait de TestResults.__doc__]

Liste des exceptions du module doctest

Nom de la classe d'exception Description
DocTestFailure A DocTest example has failed in debugging mode. [extrait de DocTestFailure.__doc__]
UnexpectedException A DocTest example has encountered an unexpected exception [extrait de UnexpectedException.__doc__]

Liste des fonctions du module doctest

Signature de la fonction Description
debug(module, name, pm=False) Debug a single doctest docstring. [extrait de debug.__doc__]
debug_script(src, pm=False, globs=None) Debug a test script. `src` is the script, as a string. [extrait de debug_script.__doc__]
debug_src(src, pm=False, globs=None) Debug a single doctest docstring, in argument `src`' [extrait de debug_src.__doc__]
DocFileSuite(*paths, **kw) A unittest suite for one or more doctest files. [extrait de DocFileSuite.__doc__]
DocFileTest(path, module_relative=True, package=None, globs=None, parser=<doctest.DocTestParser object at 0x7f720d5d3390>, encoding=None, **options)
DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None, **options)
namedtuple(typename, field_names, *, rename=False, defaults=None, module=None) Returns a new subclass of tuple with named fields. [extrait de namedtuple.__doc__]
register_optionflag(name)
run_docstring_examples(f, globs, verbose=False, name='NoName', compileflags=None, optionflags=0)
script_from_examples(s) Extract script from text with examples. [extrait de script_from_examples.__doc__]
set_unittest_reportflags(flags) Sets the unittest option flags. [extrait de set_unittest_reportflags.__doc__]
testfile(filename, module_relative=True, name=None, package=None, globs=None, verbose=None, report=True, optionflags=0, extraglobs=None, raise_on_error=False, parser=<doctest.DocTestParser object at 0x7f720d5d1710>, encoding=None)
testmod(m=None, name=None, globs=None, verbose=None, report=True, optionflags=0, extraglobs=None, raise_on_error=False, exclude_empty=False) m=None, name=None, globs=None, verbose=None, report=True, [extrait de testmod.__doc__]
testsource(module, name) Extract the test sources from a doctest docstring as a script. [extrait de testsource.__doc__]

Liste des variables globales du module doctest

Nom de la variable globale Valeur
BLANKLINE_MARKER <BLANKLINE>
COMPARISON_FLAGS 63
DONT_ACCEPT_BLANKLINE 2
DONT_ACCEPT_TRUE_FOR_1 1
ELLIPSIS 8
ELLIPSIS_MARKER ...
FAIL_FAST 1024
IGNORE_EXCEPTION_DETAIL 32
master None
NORMALIZE_WHITESPACE 4
OPTIONFLAGS_BY_NAME {'DONT_ACCEPT_TRUE_FOR_1': 1, 'DONT_ACCEPT_BLANKLINE': 2, 'NORMALIZE_WHITESPACE': 4, 'ELLIPSIS': 8, 'SKIP': 16, 'IGNORE_EXCEPTION_DETAIL': 32, 'REPORT_UDIFF': 64, 'REPORT_CDIFF': 128, 'REPORT_NDIFF': 256, 'REPORT_ONLY_FIRST_FAILURE': 512, 'FAIL_FAST': 1024}
REPORT_CDIFF 128
REPORT_NDIFF 256
REPORT_ONLY_FIRST_FAILURE 512
REPORT_UDIFF 64
REPORTING_FLAGS 1984
SKIP 16