Exemplo n.º 1
0
class TestCaseTest(TestCase):
    def setUp(self):
        self.test = WasRun("testMethod")
    def testRunning(self, result):
        self.test.run()
        assert(self.test.wasRun)
    def testSetUp(self):
        self.test.run()
        assert(self.test.wasSetUp)
        assert("setUp testMethod " == self.test.log)
    def testTemplateMethod(self):
        test = WasRun("testMethod")
        test.run(result)
        assert("setUp testMethod tearDown " == test.log)
        print "setUp testMethod tearDown " == test.log
    def testResult(self):
        test = WasRun("testMethod")
        result = test.run();
        assert("1 run, 0 failed" == result.summary())
        print "1 run, 0 failed" == result.summary()
    def testFailedResult(self):
        test = WasRun("testBrokenMethod")
        result = test.run(result);
        assert("1 run, 1 failed" == result.summary())
Exemplo n.º 2
0
 def testFailedResult(self):
     test = WasRun("testBrokenMethod")
     result = test.run(result);
     assert("1 run, 1 failed" == result.summary())
Exemplo n.º 3
0
 def testResult(self):
     test = WasRun("testMethod")
     result = test.run();
     assert("1 run, 0 failed" == result.summary())
     print "1 run, 0 failed" == result.summary()
Exemplo n.º 4
0
 def testTemplateMethod(self):
     test = WasRun("testMethod")
     test.run(result)
     assert("setUp testMethod tearDown " == test.log)
     print "setUp testMethod tearDown " == test.log
Exemplo n.º 5
0
 def testFailedResult(self):
     test = WasRun("testBrokenMethod")
     test.run(self.result)
     assert ("1 run, 1 failed" == self.result.summary())
Exemplo n.º 6
0
 def testResult(self):
     test = WasRun("testMethod")
     test.run(self.result)
     assert ("1 run, 0 failed" == self.result.summary())
Exemplo n.º 7
0
 def testTemplateMethod(self):
     test = WasRun("testMethod")
     test.run(self.result)
     assert ("setUp testMethod tearDown " == test.log)