def test_div_frac(self): self.assertIs(fracs.cmp_frac(fracs.div_frac([1, 1], [1, 1]), [1, 1]), 0) self.assertIs(fracs.cmp_frac(fracs.div_frac([1, 2], [1, 2]), [1, 1]), 0) self.assertIs(fracs.cmp_frac(fracs.div_frac([1, 2], [1, -2]), [-1, 1]), 0)
def test_div_frac(self): self.assertEqual(fracs.div_frac([0, 2], [3, 3]), [0, 6]) self.assertEqual(fracs.div_frac([3, 2], [-4, 3]), [9, -8])
def test_div_frac(self): self.assertEqual(fracs.div_frac(f4, f1), [12, -2]) self.assertEqual(fracs.div_frac(f3, f4), [6, 6]) self.assertEqual(fracs.div_frac(f5, f1), [0, -2])
def test_div_frac(self): self.assertEqual(fracs.div_frac([5, 10], [1, 3]), [3, 2])
def test_div_frac(self): self.assertEqual(fracs.div_frac([1, 2], [2, 3]), [3, 4])
def test_div_frac(self): self.assertEqual(fracs.div_frac(self.pierwszy, self.drugi), [6, 2])
def test_div_frac(self): self.assertEqual(fracs.div_frac([7, 4], [7, 2]), [14, 28])
def test_div_frac(self): self.assertEqual(fracs.div_frac([1, 2], [1, 3]), [3, 2]) self.assertEqual(fracs.div_frac([0, 2], [1, 3]), [0, 0]) self.assertEqual(fracs.div_frac([1, 3], [1, 6]), [2, 1]) self.assertEqual(fracs.div_frac([-1, 2], [1, 3]), [-3, 2]) self.assertEqual(fracs.div_frac([1, 2], [0, 3]), [0, 0])
def test_div_frac(self): self.assertEqual(fracs.div_frac([1, 2], [1, 2]), [2, 2]) self.assertEqual(fracs.div_frac([2, 3], [1, 2]), [4, 3])