Python nose.tools 模块,assert_less() 实例源码

我们从Python开源项目中,提取了以下6个代码示例,用于说明如何使用nose.tools.assert_less()

项目:leetcode    作者:thomasyimgit    | 项目源码 | 文件源码
def test_info_serialliar():
    fib_tracker = [0]
    inspector.info(SerialLiar(fib_tracker))

    # Nested attribute access should be cut off at 100 levels deep to avoid
    # infinite loops: https://github.com/ipython/ipython/issues/9122
    nt.assert_less(fib_tracker[0], 9000)
项目:Repobot    作者:Desgard    | 项目源码 | 文件源码
def test_info_serialliar():
    fib_tracker = [0]
    i = inspector.info(SerialLiar(fib_tracker))

    # Nested attribute access should be cut off at 100 levels deep to avoid
    # infinite loops: https://github.com/ipython/ipython/issues/9122
    nt.assert_less(fib_tracker[0], 9000)
项目:blender    作者:gastrodia    | 项目源码 | 文件源码
def test_info_serialliar():
    fib_tracker = [0]
    i = inspector.info(SerialLiar(fib_tracker))

    # Nested attribute access should be cut off at 100 levels deep to avoid
    # infinite loops: https://github.com/ipython/ipython/issues/9122
    nt.assert_less(fib_tracker[0], 9000)
项目:Parallel-SGD    作者:angadgill    | 项目源码 | 文件源码
def test_assert_less():
        # Check that the nose implementation of assert_less gives the
        # same thing as the scikit's
        assert_less(0, 1)
        _assert_less(0, 1)
        assert_raises(AssertionError, assert_less, 1, 0)
        assert_raises(AssertionError, _assert_less, 1, 0)
项目:Parallel-SGD    作者:angadgill    | 项目源码 | 文件源码
def test_assert_greater():
        # Check that the nose implementation of assert_less gives the
        # same thing as the scikit's
        assert_greater(1, 0)
        _assert_greater(1, 0)
        assert_raises(AssertionError, assert_greater, 0, 1)
        assert_raises(AssertionError, _assert_greater, 0, 1)
项目:yatta_reader    作者:sound88    | 项目源码 | 文件源码
def test_info_serialliar():
    fib_tracker = [0]
    inspector.info(SerialLiar(fib_tracker))

    # Nested attribute access should be cut off at 100 levels deep to avoid
    # infinite loops: https://github.com/ipython/ipython/issues/9122
    nt.assert_less(fib_tracker[0], 9000)