Exemple #1
0
 def test_minus10by_0(self):
     print("Expect logging critical re -10 and div by 0")
     with self.assertRaises(ZeroDivisionError):
         debk.divider(-10, 0)
Exemple #2
0
 def test_minus10by3(self):
     # Handles negative dividend appropriately.
     self.assertEqual(debk.divider(-10, 3), [-3.33, -3.33, -3.34])
Exemple #3
0
 def test10by_minus3(self):
     print("Expect logging critical re -3")
     with self.assertRaises(AssertionError):
         debk.divider(10, -3)
Exemple #4
0
 def test10by3(self):
     self.assertEqual(debk.divider(10, 3), [3.34, 3.33, 3.33])