kopia lustrzana https://github.com/micropython/micropython-lib
unittest: assertRaises(): Pass kwargs down to function too.
rodzic
5c70cace45
commit
272f0a1985
|
@ -15,9 +15,9 @@ class TestCase:
|
|||
def assertIsInstance(self, x, y, msg=''):
|
||||
assert isinstance(x, y), msg
|
||||
|
||||
def assertRaises(self, exc, func, *args):
|
||||
def assertRaises(self, exc, func, *args, **kwargs):
|
||||
try:
|
||||
func(*args)
|
||||
func(*args, **kwargs)
|
||||
assert False, "%r not raised" % exc
|
||||
except Exception as e:
|
||||
if isinstance(e, exc):
|
||||
|
|
Ładowanie…
Reference in New Issue