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)

[((13, 12, 14, 60), 'gwlfe.MultiUse_Fxns.Runoff.AgRunoff.AgRunoff_f', 'AgRunoff.AgRunoff_f', ({(13, 32, 13, 38): 'z.NYrs', (13, 40, 13, 51): 'z.DaysMonth', (13, 53, 13, 59): 'z.Temp', (13, 61, 13, 73): 'z.InitSnow_0', (13, 75, 13, 81): 'z.Prec', (13, 83, 13, 89): 'z.NRur', (13, 91, 13, 95): 'z.CN', (13, 97, 13, 109): 'z.AntMoist_0', (13, 111, 13, 117): 'z.NUrb', (14, 32, 14, 40): 'z.Grow_0', (14, 42, 14, 51): 'z.Landuse', (14, 53, 14, 59): '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)', False, 'from gwlfe.MultiUse_Fxns.Runoff import AgRunoff\n'), ((15, 12, 16, 58), 'gwlfe.MultiUse_Fxns.Runoff.AgRunoff.AgRunoff', 'AgRunoff.AgRunoff', ({(15, 30, 15, 36): 'z.NYrs', (15, 38, 15, 49): 'z.DaysMonth', (15, 51, 15, 57): 'z.Temp', (15, 59, 15, 71): 'z.InitSnow_0', (15, 73, 15, 79): 'z.Prec', (15, 81, 15, 87): 'z.NRur', (15, 89, 15, 93): 'z.CN', (15, 95, 15, 107): 'z.AntMoist_0', (15, 109, 15, 115): 'z.NUrb', (16, 30, 16, 38): 'z.Grow_0', (16, 40, 16, 49): 'z.Landuse', (16, 51, 16, 57): '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)', False, 'from gwlfe.MultiUse_Fxns.Runoff import AgRunoff\n')]