Skip to content

Commit

Permalink
add wrong shape test to Variable.notnull_equals
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmgray committed Sep 7, 2016
1 parent 50a59b3 commit ae90fa1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions xarray/test/test_variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,11 +570,14 @@ def test_notnull_equals(self):

self.assertFalse(v1.notnull_equals(None))

v4 = Variable(('x'), [np.nan, 1, 3, np.nan])
v3 = Variable(('x'), [np.nan, 1, 3, np.nan])
self.assertFalse(v3.notnull_equals(v1))

v4 = Variable(('y'), [np.nan, 2, 3, np.nan])
self.assertFalse(v4.notnull_equals(v1))

v3 = Variable(('y'), [np.nan, 2, 3, np.nan])
self.assertFalse(v3.notnull_equals(v1))
v5 = Variable(('x', 'y'), [[1, 2], [np.nan, np.nan]])
self.assertFalse(v1.notnull_equals(v5))

d = np.array([1, 2, np.nan, np.nan])
self.assertFalse(v1.notnull_equals(d))
Expand Down

0 comments on commit ae90fa1

Please sign in to comment.