MCPcopy Create free account
hub / github.com/vispy/vispy / _format_msg

Function _format_msg

vispy/testing/_testing.py:54–63  ·  view source on GitHub ↗

Helper for assert_* ports

(msg, std_msg)

Source from the content-addressed store, hash-verified

52
53
54def _format_msg(msg, std_msg):
55 """Helper for assert_* ports"""
56 if msg is None:
57 msg = std_msg
58 else:
59 try:
60 msg = '%s : %s' % (std_msg, msg)
61 except UnicodeDecodeError:
62 msg = '%s : %s' % (_safe_str(std_msg), _safe_str(msg))
63 return msg
64
65
66def nottest(func):

Callers 7

assert_raisesFunction · 0.85
assert_inFunction · 0.85
assert_trueFunction · 0.85
assert_equalFunction · 0.85
assert_not_equalFunction · 0.85
assert_not_inFunction · 0.85
assert_isFunction · 0.85

Calls 1

_safe_strFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…