Skip to content
This repository has been archived by the owner on May 4, 2020. It is now read-only.

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiofsilva committed Oct 10, 2016
1 parent c745102 commit 3319144
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tests/test_by_name_functions.py
Expand Up @@ -16,20 +16,15 @@ def test_sheet_index(self):

def test_get_by_name(self):
'Get sheet by name'
ws = self.wb.get_sheet(1)
ws = self.wb.get_sheet('Plan2')
self.assertEqual('Plan2', ws.name)

def test_get_by_index(self):
'Get sheet by index'
ws = self.wb.get_sheet('Plan2')
ws = self.wb.get_sheet(1)
self.assertEqual('Plan2', ws.name)

def test_invalid_sheet_parameter(self):
'Raises exception when sheet is not string or integer'
try:
self.wb.get_sheet(1.1)
except Exception as e:
self.assertTrue('sheet must be integer or string', e)
else:
self.fail('exception not raised')
self.assertRaises(Exception, self.wb.get_sheet, 1.1)

0 comments on commit 3319144

Please sign in to comment.