Commit c3e6a3b4 authored by BorjaEst's avatar BorjaEst
Browse files

Reconfiguration of unittests to module changes

parent 05e0605a
...@@ -171,5 +171,3 @@ class TestsModel(unittest.TestCase): ...@@ -171,5 +171,3 @@ class TestsModel(unittest.TestCase):
def test_dataset_has_model_accessor(self): def test_dataset_has_model_accessor(self):
model = TestsModel.model() model = TestsModel.model()
self.assertHasAttr(model, 'model') self.assertHasAttr(model, 'model')
xr.testing.assert_equal(model["tco3_zm"], model.model.tco3)
xr.testing.assert_equal(model["vmro3_zm"], model.model.vmro3)
...@@ -108,10 +108,12 @@ class Tests(unittest.TestCase): ...@@ -108,10 +108,12 @@ class Tests(unittest.TestCase):
) )
def test_tco3_property(self): def test_tco3_property(self):
xr.testing.assert_equal(self.ds.model.tco3, Tests.tco3_datarray()) expected = Tests.tco3_datarray().to_dataset(name="tco3_zm")
xr.testing.assert_equal(self.ds.model.tco3, expected)
def test_vmro3_property(self): def test_vmro3_property(self):
xr.testing.assert_equal(self.ds.model.vmro3, Tests.vmro3_datarray()) expected = Tests.vmro3_datarray().to_dataset(name="vmro3_zm")
xr.testing.assert_equal(self.ds.model.vmro3, expected)
def test_groupby_year(self): def test_groupby_year(self):
groups = self.ds.model.groupby_year() groups = self.ds.model.groupby_year()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment