Exemple #1
0
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)
Exemple #2
0
def test_estimate_range_size_4():
    with pytest.raises(AssertionError):
        test_module._estimate_range_size(mock.ANY, [])
Exemple #3
0
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)