Skip to content

Commit

Permalink
Improve test coverage a little bit
Browse files Browse the repository at this point in the history
  • Loading branch information
ckhroulev committed Jan 29, 2021
1 parent 7d97b45 commit 176ad57
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/regression/ocean_models.py
Expand Up @@ -414,6 +414,7 @@ def setUp(self):
def test_ocean_cache(self):
"Modifier Cache"

model = self.constant
modifier = PISM.OceanCache(self.grid, self.delta_T)

modifier.init(self.geometry)
Expand All @@ -426,7 +427,13 @@ def test_ocean_cache(self):
for t in ts:
modifier.update(self.geometry, t, dt)

original = sample(self.constant.shelf_base_temperature())
check_difference(model.shelf_base_mass_flux(),
modifier.shelf_base_mass_flux(), 0.0)

check_difference(model.integrated_water_column_pressure(),
modifier.integrated_water_column_pressure(), 0.0)

original = sample(model.shelf_base_temperature())
cached = sample(modifier.shelf_base_temperature())

diff.append(cached - original)
Expand Down

0 comments on commit 176ad57

Please sign in to comment.