def test_string_in_sub(self): with self.assertRaises(TypeError): sub('b', 3)
def test_sub(): assert sub(10, 5) == 10
def test_sub(self): self.assertEqual(sub(5, 2), 3)
def test_sub(self): self.assertEqual(main.sub(6, 4), 2, 'subtraction fail')
def test_sub(self): self.assertEqual(main.sub(10, 5), 5) self.assertEqual(main.sub(-5, 5), -10) self.assertEqual(main.sub(-5, -5), 0)
def testSub(self): self.assertEqual(main.sub(2, 1), 1) self.assertEqual(main.sub(2.5, 1.5), 1)