'Check x is an infinity of the same type and sign as inf.'

def check_infinity(self, x, inf):

    self.assertTrue(math.isinf(x))
    self.assertIs(type(x), type(inf))
    self.assertEqual((x > 0), (inf > 0))
    assert (x == inf)
