Skip to content

Commit

Permalink
Change tests to account for new behaviour.
Browse files Browse the repository at this point in the history
  • Loading branch information
Laura Dreyer committed Sep 17, 2015
1 parent 68b2a60 commit 4b207f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/iris/tests/unit/fileformats/cf/test_CFReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,10 @@ def test_formula_terms_ignore(self):
group = cf_group.promoted
self.assertEqual(list(group.keys()), ['orography'])
self.assertIs(group['orography'].cf_data, self.orography)
self.assertEqual(warn.call_count, 1)
else:
self.assertEqual(len(cf_group.promoted), 0)
self.assertEqual(warn.call_count, 1)
self.assertEqual(warn.call_count, 2)

def test_auxiliary_ignore(self):
self.x.dimensions = ['lat', 'wibble']
Expand All @@ -296,9 +297,10 @@ def test_auxiliary_ignore(self):
self.assertEqual(set(group.keys()), set(promoted))
for name in promoted:
self.assertIs(group[name].cf_data, getattr(self, name))
self.assertEqual(warn.call_count, 1)
else:
self.assertEqual(len(cf_group.promoted), 0)
self.assertEqual(warn.call_count, 1)
self.assertEqual(warn.call_count, 2)

def test_promoted_auxiliary_ignore(self):
self.wibble = netcdf_variable('wibble', 'lat wibble', np.float)
Expand Down
3 changes: 3 additions & 0 deletions lib/iris/tests/unit/unit/test_suppress_unit_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
from iris.unit import suppress_unit_warnings


iris.FUTURE.netcdf_promote = True


class Test(tests.IrisTest):

def test_generic_warnings(self):
Expand Down

0 comments on commit 4b207f9

Please sign in to comment.