예제 #1
0
파일: test_edges.py 프로젝트: markovg/snap
def test_estimate_range_size_3():
    func = lambda x: Mock(ranges=[42])
    actual = test_module._estimate_range_size(func, range(10))
    npt.assert_equal(actual, 1)
예제 #2
0
파일: test_edges.py 프로젝트: markovg/snap
def test_estimate_range_size_4():
    with pytest.raises(AssertionError):
        test_module._estimate_range_size(mock.ANY, [])
예제 #3
0
파일: test_edges.py 프로젝트: markovg/snap
def test_estimate_range_size_1():
    func = lambda x: Mock(ranges=np.zeros(x))
    actual = test_module._estimate_range_size(func, [11, 21, 31], n=5)
    npt.assert_equal(actual, 21)