def test_10_20(self): print "executing test1" print self.user act = fun(10, 20) exp = 30 self.assertEqual(act, exp, "test_10_20 failed")
def test_fun_10_s2(self): #print "setting the resource" print self.user exp = None act = fun(10, "s2") self.assertEqual(act, exp, "test_fun_10_s2 is failed") #print "deleting the resource" #unittest.main()
def test_fun_s1_s2(self): #print self.user exp = "s1s2" act = fun("s1", "s2") self.assertEqual(exp, act, "test_fun_s1_s2 failed")
def test_10_str2(self): print("test_10_str2") print(self.user) act = fun(10, "str2") exp = None self.assertTrue(act == exp, "test_10_str2 failed")
def test_10_20(self): print("test_10_20") print(self.user) act = fun(10, 20) exp = 30 self.assertTrue(act == exp, "test_10_20 failed")
def test_s1_20(self): #print self.user sop = None actop = fun("s1", 20) self.assertTrue(sop == actop, "test_s1_20 is failed")
def test_10_20(self): #print self.user sop = 30 actop = fun(10, 20) self.assertTrue(sop == actop, "test_10_20 is failed")
def test_10_s2(self): print("running test_10_s2: %s" % self.user) res = fun(10, "s2") exp = None self.assertEqual(res, exp, "test_10_s2 failed")
def test_s1_s2(self): print("running test_s1_s2 %s" % self.user) res = fun("s1", "s2") exp = "s1s2" self.assertEqual(res, exp, "test_s1_s2 failed")
def test_str1_str2(self): print(self.user) act=fun("str1","str2") exp="str1str2" self.assertEqual(act, exp, "test_str1_str2 failed")
def test_10_20(self): print(self.user) act=fun(10,20) exp=30 self.assertEqual(act, exp, "test_10_20 failed")
def test_fun_str1_20(self): print("test_fun_str1_20 execduting..") exp = "str120" act = fun("str1", 20) self.assertTrue(exp == act, "test_fun_str1_20 failed.")
def test_fun_10_str2(self): print("test_fun_10_str2 execduting..") exp = "10str2" act = fun(10, "str2") self.assertTrue(exp == act, "test_fun_10_str2 failed.")
def test_fun_10_20(self): print("test_fun_10_20 executing") exp = 30 act = fun(10, 20) self.assertTrue(exp == act, "test_fun_10_20 failed..")
def test_fun_s1_20(self): #print "setting the resource" print self.user exp = None act = fun("s1", 20) self.assertEqual(act, exp, "test_fun_s1_10 failed")
def test_10_str3(self): print "executing test2" print self.user act = fun(10, "str3") exp = None self.assertEqual(act, exp, "test_10_str3 failed")
def test_10_20(self): print("running test_10_20: %s" % self.user) res = fun(10, 20) exp = 30 self.assertEqual(res, exp, "test_10_20 failed")
def test_10_str2(self): print(self.user) act=fun(10,"str2") exp=None self.assertEqual(act, exp, "test_10_str2 failed")
def test_s1_20(self): print("running test_s1_20 %s" % self.user) res = fun("s1", 20) exp = None self.assertEqual(res, exp, "test_s1_20 failed")
def test_1(self): act = fun(10, 20) exp = 30 self.assertTrue(act == exp, "test_1 failed")
def test_fun(self): a = app.fun(1) self.assertEqual(a, 11, "Should be 11")
def test_2(self): act = fun(1.2, 3.4) exp = 4.6 self.assertTrue(act == exp, "test_2 failed")
def test_s1_s2(self): #print self.user sop = "s1s2" actop = fun("s1", "s2") self.assertEqual(sop, actop, "test_s1_s2 is failed")
def test_3(self): act = fun(10, 1.2) exp = 11.2 self.assertTrue(act == exp, "test_3 failed")
def test_10_s2(self): print self.user sop = None actop = fun(10, "s2") self.assertTrue(sop == actop, "test_10_s2 is failed")
def test_4(self): act = fun("str1", "py") exp = "str1py" self.assertTrue(act == exp, "test_4 failed")
def test_str1_20(self): print("test_str1_20") print(self.user) act = fun("str1", 20) exp = None self.assertTrue(act == exp, "test_str1_20 failed")
def test_5(self): act = fun(10, "str1") exp = None self.assertTrue(act == exp, "test_5 failed")
def test_str1_str2(self): print("test_str1_str2") print(self.user) act = fun("str1", "str2") exp = "str1str2" self.assertTrue(act == exp, "test_10_20 failed")
def test_fun_10_20(self): #print "setting the resource" print self.user exp = 30 act = fun(10, 20) self.assertEqual(exp, act, "test_fun_10_20 failed")