import numpy as np

from .VariableUnitTest import VariableUnitTest
from gwlfe.MultiUse_Fxns.Runoff import AgRunoff


class TestAgRunoff(VariableUnitTest):

    # @skip("not ready")
    def test_AgRunoff(self):
        z = self.z
        np.testing.assert_array_almost_equal(
            AgRunoff.AgRunoff_f(z.NYrs, z.DaysMonth, z.Temp, z.InitSnow_0, z.Prec, z.NRur, z.CN, z.AntMoist_0, z.NUrb,
                                z.Grow_0, z.Landuse, z.Area),
            AgRunoff.AgRunoff(z.NYrs, z.DaysMonth, z.Temp, z.InitSnow_0, z.Prec, z.NRur, z.CN, z.AntMoist_0, z.NUrb,
                              z.Grow_0, z.Landuse, z.Area), decimal=7)

[((287, 427), 'gwlfe.MultiUse_Fxns.Runoff.AgRunoff.AgRunoff_f', 'AgRunoff.AgRunoff_f', (['z.NYrs', 'z.DaysMonth', 'z.Temp', 'z.InitSnow_0', 'z.Prec', 'z.NRur', 'z.CN', 'z.AntMoist_0', 'z.NUrb', 'z.Grow_0', 'z.Landuse', 'z.Area'], {}), '(z.NYrs, z.DaysMonth, z.Temp, z.InitSnow_0, z.Prec, z.\n    NRur, z.CN, z.AntMoist_0, z.NUrb, z.Grow_0, z.Landuse, z.Area)\n', (306, 427), False, 'from gwlfe.MultiUse_Fxns.Runoff import AgRunoff\n'), ((468, 605), 'gwlfe.MultiUse_Fxns.Runoff.AgRunoff.AgRunoff', 'AgRunoff.AgRunoff', (['z.NYrs', 'z.DaysMonth', 'z.Temp', 'z.InitSnow_0', 'z.Prec', 'z.NRur', 'z.CN', 'z.AntMoist_0', 'z.NUrb', 'z.Grow_0', 'z.Landuse', 'z.Area'], {}), '(z.NYrs, z.DaysMonth, z.Temp, z.InitSnow_0, z.Prec, z.NRur,\n    z.CN, z.AntMoist_0, z.NUrb, z.Grow_0, z.Landuse, z.Area)\n', (485, 605), False, 'from gwlfe.MultiUse_Fxns.Runoff import AgRunoff\n')]