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

Function assert_raises

vispy/testing/_testing.py:72–79  ·  view source on GitHub ↗

Backport

(exp, func, *args, **kwargs)

Source from the content-addressed store, hash-verified

70
71
72def assert_raises(exp, func, *args, **kwargs):
73 """Backport"""
74 try:
75 func(*args, **kwargs)
76 except exp:
77 return
78 std_msg = '%s not raised' % (_safe_rep(exp))
79 raise AssertionError(_format_msg(None, std_msg))
80
81
82def assert_in(member, container, msg=None):

Callers 15

test_figure_creationFunction · 0.90
test_resizeFunction · 0.90
test_wavefrontFunction · 0.90
_test_module_propertiesFunction · 0.90
test_templateFunction · 0.90
test_capabilityFunction · 0.90
test_applicationFunction · 0.90
test_fsFunction · 0.90
test_abstractFunction · 0.90
test_context_propertiesFunction · 0.90
test_context_sharingFunction · 0.90

Calls 3

_safe_repFunction · 0.85
_format_msgFunction · 0.85
funcFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…