Skip to content

Commit

Permalink
Split empty from_tuples test
Browse files Browse the repository at this point in the history
  • Loading branch information
Douglas Rudd authored and jreback committed Jul 7, 2017
1 parent e3d670a commit 39b544a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pandas/tests/indexes/test_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1717,14 +1717,15 @@ def test_from_tuples(self):
'from empty list',
MultiIndex.from_tuples, [])

idx = MultiIndex.from_tuples(((1, 2), (3, 4)), names=['a', 'b'])
assert len(idx) == 2

def test_from_tuples_empty(self):
result = MultiIndex.from_tuples([], names=['a', 'b'])
expected = MultiIndex.from_arrays(arrays=[[], []],
names=['a', 'b'])
tm.assert_index_equal(result, expected)

idx = MultiIndex.from_tuples(((1, 2), (3, 4)), names=['a', 'b'])
assert len(idx) == 2

def test_argsort(self):
result = self.index.argsort()
expected = self.index.values.argsort()
Expand Down

0 comments on commit 39b544a

Please sign in to comment.