"""Tools so trivial that tracebacks should not descend into them
We define the ``__unittest`` symbol in their module namespace so unittest will skip them when printing tracebacks, just as it does for their corresponding methods in ``unittest`` proper.
"""
# Use the same flag as unittest itself to prevent descent into these functions:
"""Shorthand for assert. Saves 3 whole characters! """ if not expr: raise AssertionError(msg)
"""Shorthand for 'assert a == b, "%r != %r" % (a, b) """ if not a == b: raise AssertionError(msg or "%r != %r" % (a, b))
# # Expose assert* from unittest.TestCase # - give them pep8 style names #
pass
if at.startswith('assert') and not '_' in at ]:
|