def testStrings(self): self.assertEqual(hw.ind('i', 'well hi there'), 6, "Make sure ind works for strings as well as lists")
def testEmptyList(self): self.assertEqual(hw.ind(1, []), 0, "Make sure you can deal with the empty string")
def testStrangeTypes(self): self.assertEqual( hw.ind(42, ['42', [42, 42]]), 2, "'42' and 42 are not equal (the first is the string, the second is a number). Also make sure that you're not going down into inner lists" )
def testInListTwice(self): self.assertEqual( hw.ind(1, [0, 0, 999, -1, 1, 2, 3, 1]), 4, "Make sure that you're checking for the first instance of the number" )
def testNotInList(self): self.assertEqual(hw.ind(1, [5, 2, 3, 5]), 4, "What happens if the element isn't in the list?")
def testStrangeTypes(self): self.assertEqual(hw.ind(42,['42',[42,42]]), 2, "'42' and 42 are not equal (the first is the string, the second is a number). Also make sure that you're not going down into inner lists")
def testEmptyList(self): self.assertEqual(hw.ind(1,[]), 0, "Make sure you can deal with the empty string")
def testNotInList(self): self.assertEqual(hw.ind(1,[5,2,3,5]), 4, "What happens if the element isn't in the list?")
def testInListTwice(self): self.assertEqual(hw.ind(1,[0,0,999,-1,1,2,3,1]), 4, "Make sure that you're checking for the first instance of the number")