Skip to content

Commit

Permalink
Update tests for new repr
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Mar 24, 2017
1 parent 7947742 commit dd98913
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion xarray/tests/test_dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_repr(self):
other int64 0
Dimensions without coordinates: time
Attributes:
foo: bar""")
foo: bar""")
self.assertEqual(expected, repr(data_array))

def test_repr_multiindex(self):
Expand Down
4 changes: 2 additions & 2 deletions xarray/tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def test_repr(self):
var2 (dim1, dim2) float64 1.162 -1.097 -2.123 1.04 -0.4034 -0.126 ...
var3 (dim3, dim1) float64 0.5565 -0.2121 0.4563 1.545 -0.2397 0.1433 ...
Attributes:
foo: bar""") % data['dim3'].dtype
foo: bar""") % data['dim3'].dtype
actual = '\n'.join(x.rstrip() for x in repr(data).split('\n'))
print(actual)
self.assertEqual(expected, actual)
Expand Down Expand Up @@ -183,7 +183,7 @@ def test_unicode_data(self):
Data variables:
*empty*
Attributes:
å: ∑""" % u'ba®')
å: ∑""" % u'ba®')
actual = unicode_type(data)
self.assertEqual(expected, actual)

Expand Down
2 changes: 1 addition & 1 deletion xarray/tests/test_variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ def test_repr(self):
array([[1, 2, 3],
[4, 5, 6]])
Attributes:
foo: bar
foo: bar
""").strip()
self.assertEqual(expected, repr(v))

Expand Down

0 comments on commit dd98913

Please sign in to comment.