def test_sand_rate_None_input(): raw = 5000 zero = 3000 step = 500 exp = 1 kwargs = {'raw': raw, 'zero': zero, 'step': step, 'exp': exp} for inp in ['raw', 'zero', 'step', 'exp']: kwargs[inp] = None with pytest.raises(exc.FunctionInputFail) as excinfo: sand_rate(**kwargs) kwargs['raw'] = raw kwargs['zero'] = zero kwargs['step'] = step kwargs['exp'] = exp
def test_sand_rate(raw, zero, step, exp, E): np.testing.assert_equal(sand_rate(raw, zero, step, exp=exp), E)
def test_sand_rate(raw, zero, step, E): assert sand_rate(raw, zero, step) == E