All Samples(255) | Call(254) | Derive(0) | Import(1)
Sets the unittest option flags.
The old flag is returned so that a runner could restore the old
value if it wished to:
>>> import doctest
>>> old = doctest._unittest_reportflags
>>> doctest.set_unittest_reportflags(REPORT_NDIFF |
... REPORT_ONLY_FIRST_FAILURE) == old
True
>>> doctest._unittest_reportflags == (REPORT_NDIFF |
... REPORT_ONLY_FIRST_FAILURE)
True
Only reporting flags can be set:
>>> doctest.set_unittest_reportflags(ELLIPSIS)
Traceback (most recent call last):
...
ValueError: ('Only reporting flags allowed', 8)
>>> doctest.set_unittest_reportflags(old) == (REPORT_NDIFF |
... REPORT_ONLY_FIRST_FAILURE)
True
def set_unittest_reportflags(flags):
"""Sets the unittest option flags.
The old flag is returned so that a runner could restore the old
value if it wished to:
>>> import doctest
>>> old = doctest._unittest_reportflags
>>> doctest.set_unittest_reportflags(REPORT_NDIFF |
... REPORT_ONLY_FIRST_FAILURE) == old
True
>>> doctest._unittest_reportflags == (REPORT_NDIFF |
... REPORT_ONLY_FIRST_FAILURE)
True
Only reporting flags can be set:
>>> doctest.set_unittest_reportflags(ELLIPSIS)
Traceback (most recent call last):
...
ValueError: ('Only reporting flags allowed', 8)
>>> doctest.set_unittest_reportflags(old) == (REPORT_NDIFF |
... REPORT_ONLY_FIRST_FAILURE)
True
"""
global _unittest_reportflags
if (flags & REPORTING_FLAGS) != flags:
raise ValueError("Only reporting flags allowed", flags)
old = _unittest_reportflags
_unittest_reportflags = flags
return old
kw['tearDown'] = tearDown
if 'optionflags' not in kw:
old = doctest.set_unittest_reportflags(0)
doctest.set_unittest_reportflags(old)
kw['optionflags'] = (old|doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE)
src/z/3/z3ext-HEAD/Sandbox/bubenkoff/z3ext-dev/z3ext/z3ext.cache/trunk/src/z3ext/cache/tests/tests.py z3ext(Download)
kw['tearDown'] = tearDown
if 'optionflags' not in kw:
old = doctest.set_unittest_reportflags(0)
doctest.set_unittest_reportflags(old)
kw['optionflags'] = (old|doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE)
src/z/3/z3ext-HEAD/sources/z3ext.cache/trunk/src/z3ext/cache/tests/tests.py z3ext(Download)
kw['tearDown'] = tearDown
if 'optionflags' not in kw:
old = doctest.set_unittest_reportflags(0)
doctest.set_unittest_reportflags(old)
kw['optionflags'] = (old|doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE)
src/z/3/z3ext-HEAD/sources/z3ext.content.model/trunk/src/z3ext/content/model/tests/tests.py z3ext(Download)
kw['setUp'] = setUp
if 'optionflags' not in kw:
old = doctest.set_unittest_reportflags(0)
doctest.set_unittest_reportflags(old)
kw['optionflags'] = (old
| doctest.ELLIPSIS
src/z/3/z3ext-HEAD/Sandbox/bubenkoff/z3ext-dev/z3ext/z3ext.authentication/trunk/src/z3ext/authentication/tests/tests.py z3ext(Download)
kw['tearDown'] = tearDown
if 'optionflags' not in kw:
old = doctest.set_unittest_reportflags(0)
doctest.set_unittest_reportflags(old)
kw['optionflags'] = (old|doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE)
src/z/3/z3ext-HEAD/Sandbox/fafhrd91/z3ext-dev/z3ext/z3ext.calendar/trunk/src/z3ext/calendar/tests/utils.py z3ext(Download)
kw['tearDown'] = tearDown
if 'optionflags' not in kw:
old = doctest.set_unittest_reportflags(0)
doctest.set_unittest_reportflags(old)
kw['optionflags'] = (old
| doctest.ELLIPSIS
src/z/3/z3ext-HEAD/Sandbox/bubenkoff/z3ext-dev/z3ext/z3ext.session/trunk/src/z3ext/session/tests/tests.py z3ext(Download)
kw['tearDown'] = tearDown
if 'optionflags' not in kw:
old = doctest.set_unittest_reportflags(0)
doctest.set_unittest_reportflags(old)
kw['optionflags'] = (old|doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE)
src/z/3/z3ext-HEAD/Sandbox/bubenkoff/z3ext-dev/z3ext/z3ext.memcached/trunk/src/z3ext/memcached/tests/tests.py z3ext(Download)
kw['tearDown'] = tearDown
if 'optionflags' not in kw:
old = doctest.set_unittest_reportflags(0)
doctest.set_unittest_reportflags(old)
kw['optionflags'] = (old|doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE)
src/z/3/z3ext-HEAD/Sandbox/bubenkoff/z3ext-dev/z3ext/z3ext.error/trunk/src/z3ext/error/tests/tests.py z3ext(Download)
kw['tearDown'] = tearDown
if 'optionflags' not in kw:
old = doctest.set_unittest_reportflags(0)
doctest.set_unittest_reportflags(old)
kw['optionflags'] = (old|doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE)
src/z/3/z3ext-HEAD/Sandbox/bubenkoff/z3ext-dev/z3ext/z3ext.calendar/trunk/src/z3ext/calendar/tests/utils.py z3ext(Download)
kw['tearDown'] = tearDown
if 'optionflags' not in kw:
old = doctest.set_unittest_reportflags(0)
doctest.set_unittest_reportflags(old)
kw['optionflags'] = (old
| doctest.ELLIPSIS
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next