Пример #1
0
 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)
Пример #2
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])
Пример #3
0
 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])
Пример #4
0
 def test_div_frac(self):
     self.assertEqual(fracs.div_frac([5, 10], [1, 3]), [3, 2])
Пример #5
0
 def test_div_frac(self):
     self.assertEqual(fracs.div_frac([1, 2], [2, 3]), [3, 4])
Пример #6
0
 def test_div_frac(self):
     self.assertEqual(fracs.div_frac(self.pierwszy, self.drugi), [6, 2])
Пример #7
0
 def test_div_frac(self):
     self.assertEqual(fracs.div_frac([7, 4], [7, 2]), [14, 28])
Пример #8
0
 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])
Пример #9
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])