Exemplo n.º 1
0
 def test_div_int_string(self):
     with self.assertRaises(TypeError):
         calculator.calc_div(10, "string")
Exemplo n.º 2
0
 def test_div_int_float(self):
     self.assertEqual(calculator.calc_div(10,0.5), 20)
Exemplo n.º 3
0
 def test_div_pos_neg(self):
     self.assertEqual(calculator.calc_div(10,-2), -5)
Exemplo n.º 4
0
 def test_div_by_zero(self):
     with self.assertRaises(ZeroDivisionError):
         calculator.calc_div(1,0)
Exemplo n.º 5
0
 def test_div_pos(self):
     self.assertEqual(calculator.calc_div(10,2), 5)