def testInit(self):
    self.assertEqual((0, 1), _components(F()))
    self.assertEqual((7, 1), _components(F(7)))
    self.assertEqual((7, 3), _components(F(F(7, 3))))
    self.assertEqual(((- 1), 1), _components(F((- 1), 1)))
    self.assertEqual(((- 1), 1), _components(F(1, (- 1))))
    self.assertEqual((1, 1), _components(F((- 2), (- 2))))
    self.assertEqual((1, 2), _components(F(5, 10)))
    self.assertEqual((7, 15), _components(F(7, 15)))
    self.assertEqual(((10 ** 23), 1), _components(F((10 ** 23))))
    self.assertEqual((3, 77), _components(F(F(3, 7), 11)))
    self.assertEqual(((- 9), 5), _components(F(2, F((- 10), 9))))
    self.assertEqual((2486, 2485), _components(F(F(22, 7), F(355, 113))))
    self.assertRaisesMessage(ZeroDivisionError, 'Fraction(12, 0)', F, 12, 0)
    self.assertRaises(TypeError, F, (1.5 + 3j))
    self.assertRaises(TypeError, F, '3/2', 3)
    self.assertRaises(TypeError, F, 3, 0j)
    self.assertRaises(TypeError, F, 3, 1j)
    self.assertRaises(TypeError, F, 1, 2, 3)
def testInit(self):
    self.assertEqual((0, 1), _components(F()))
    self.assertEqual((7, 1), _components(F(7)))
    self.assertEqual((7, 3), _components(F(F(7, 3))))
    self.assertEqual(((- 1), 1), _components(F((- 1), 1)))
    self.assertEqual(((- 1), 1), _components(F(1, (- 1))))
    self.assertEqual((1, 1), _components(F((- 2), (- 2))))
    self.assertEqual((1, 2), _components(F(5, 10)))
    self.assertEqual((7, 15), _components(F(7, 15)))
    self.assertEqual(((10 ** 23), 1), _components(F((10 ** 23))))
    self.assertEqual((3, 77), _components(F(F(3, 7), 11)))
    self.assertEqual(((- 9), 5), _components(F(2, F((- 10), 9))))
    self.assertEqual((2486, 2485), _components(F(F(22, 7), F(355, 113))))
    self.assertRaisesMessage(ZeroDivisionError, 'Fraction(12, 0)', F, 12, 0)
    self.assertRaises(TypeError, F, (1.5 + 3j))
    self.assertRaises(TypeError, F, '3/2', 3)
    self.assertRaises(TypeError, F, 3, 0j)
    self.assertRaises(TypeError, F, 3, 1j)
    self.assertRaises(TypeError, F, 1, 2, 3)