Skip to content

Commit

Permalink
Add unit test for axis label changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
kwgoodman committed Oct 6, 2010
1 parent a66b871 commit 1015c19
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion datarray/tests/test_data_array.py
Expand Up @@ -75,6 +75,11 @@ def test_combination():
res = narr + narr
yield nt.assert_equal, res.axes, narr.axes

def test_label_change():
a = DataArray([1,2,3])
yield nt.assert_equal, a.labels, (None,)
a.axes[0].label = "test"
yield nt.assert_equal, a.labels, ("test",)

def test_1d():
adata = [2,3]
Expand All @@ -88,7 +93,6 @@ def test_1d():
yield (nt.assert_equals,val,adata[i])
yield (nt.assert_true,isinstance(val,int))


def test_2d():
b = DataArray([[1,2],[3,4],[5,6]], 'xy')
yield (nt.assert_equals, b.labels, ('x','y'))
Expand Down

0 comments on commit 1015c19

Please sign in to comment.