def test_index_positive(self): s = SortedSet([1, 5, 8, 9]) self.assertEqual(s.index(8), 2)
def test_index_negative(self): s = SortedSet([1, 5, 8, 9]) with self.assertRaises(ValueError): s.index(15)
def test_index_positive(self): s = SortedSet({1, 2, 3, 9, 4, 6}) self.assertEqual(s.index(3), 2)
def test_index_negative(self): s = SortedSet({1, 2, 3, 9, 4, 6}) with self.assertRaises(ValueError): s.index(58)
def test_negative_index(self): s = SortedSet([1, 2, 3, 4]) with self.assertRaises(ValueError): s.index(14)
def test_index_positive(self): s = SortedSet([2, 4, 6, 7]) self.assertEqual(s.index(2), 6)
def test_index_positive(self): s = SortedSet([1, 3, 5, 7]) self.assertEqual(s.index(5), 2)
def test_positive_index(self): s = SortedSet([1, 2, 3, 4]) self.assertEqual(1, s.index(2))
def test_index_positive(self): s = SortedSet([1, 2, 3]) self.assertEqual(s.index(1), 0)
def test_index_negative(self): s = SortedSet([7, 14, 22, 23]) with self.assertRaises(ValueError): s.index(15)
def test_index_positive(self): s = SortedSet([7, 14, 22, 23]) self.assertEqual(s.index(22), 2)