~jml/testtools/exc-info-929063

« back to all changes in this revision

Viewing changes to testtools/compat.py

Many new matchers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
 
129
129
 
130
130
def _slow_escape(text):
131
 
    """Escape unicode `text` leaving printable characters unmodified
 
131
    """Escape unicode ``text`` leaving printable characters unmodified
132
132
 
133
133
    The behaviour emulates the Python 3 implementation of repr, see
134
134
    unicode_repr in unicodeobject.c and isprintable definition.
158
158
 
159
159
 
160
160
def text_repr(text, multiline=None):
161
 
    """Rich repr for `text` returning unicode, triple quoted if `multiline`"""
 
161
    """Rich repr for ``text`` returning unicode, triple quoted if ``multiline``.
 
162
    """
162
163
    is_py3k = sys.version_info > (3, 0)
163
164
    nl = _isbytes(text) and bytes((0xA,)) or "\n"
164
165
    if multiline is None: