コード例 #1
0
ファイル: utils.py プロジェクト: widVE/FionaOgre
def assert_raises(*args,**kwargs):
    """
    assert_raises(exception_class, callable, *args, **kwargs)

    Fail unless an exception of class exception_class is thrown
    by callable when invoked with arguments args and keyword
    arguments kwargs. If a different type of exception is
    thrown, it will not be caught, and the test case will be
    deemed to have suffered an error, exactly as for an
    unexpected exception.

    """
    nose = import_nose()
    return nose.tools.assert_raises(*args,**kwargs)
コード例 #2
0
ファイル: utils.py プロジェクト: chadnetzer/numpy-gaurdro
def assert_raises(*args,**kwargs):
    """
    assert_raises(exception_class, callable, *args, **kwargs)

    Fail unless an exception of class exception_class is thrown
    by callable when invoked with arguments args and keyword
    arguments kwargs. If a different type of exception is
    thrown, it will not be caught, and the test case will be
    deemed to have suffered an error, exactly as for an
    unexpected exception.

    """
    nose = import_nose()
    return nose.tools.assert_raises(*args,**kwargs)
コード例 #3
0
ファイル: utils.py プロジェクト: widVE/FionaOgre
def raises(*args,**kwargs):
    nose = import_nose()
    return nose.tools.raises(*args,**kwargs)
コード例 #4
0
ファイル: utils.py プロジェクト: chadnetzer/numpy-gaurdro
def raises(*args,**kwargs):
    nose = import_nose()
    return nose.tools.raises(*args,**kwargs)
コード例 #5
0
ファイル: utils.py プロジェクト: MrDapperGent/singularity-osx
def assert_raises(*args,**kwargs):
    nose = import_nose()
    return nose.tools.assert_raises(*args,**kwargs)