'Test max_entries.'

def test_max_entries(self):

    self.assertEqual(max_entries(1).sign, s.POSITIVE)
    self.assertEqual(max_entries((-2)).sign, s.NEGATIVE)
    self.assertEqual(max_entries(Variable()).sign, s.UNKNOWN)
    self.assertEqual(max_entries(0).sign, s.ZERO)
    self.assertEqual(max_entries(Variable(2), axis=0).size, (1, 1))
    self.assertEqual(max_entries(Variable(2), axis=1).size, (2, 1))
    self.assertEqual(max_entries(Variable(2, 3), axis=0).size, (1, 3))
    self.assertEqual(max_entries(Variable(2, 3), axis=1).size, (2, 1))
    with self.assertRaises(Exception) as cm:
        max_entries(self.x, axis=4)
    self.assertEqual(str(cm.exception), 'Invalid    argument    for    axis.')
