Ejemplo n.º 1
0
 def testFailIfExec(self):
     test = TestExec()
     try:
         test.failIf(True, "Fail test")
     except TestFailError:
         pass
     except:
         self.failIf(True)
     else:
         self.failIf(True)
Ejemplo n.º 2
0
 def testAbortIfExec(self):
     test = TestExec()
     try:
         test.abortIf(True, "Abort test")
     except TestAbortError:
         pass
     except:
         self.failIf(True)
     else:
         self.failIf(True)
Ejemplo n.º 3
0
 def testFailThisExec(self):
     test = TestExec()
     try:
         test.failThis(False, "Fail this test")
     except TestFailThisError:
         pass
     except:
         self.failIf(True)
     else:
         self.failIf(True)
Ejemplo n.º 4
0
 def testFailIfExec(self):
     test = TestExec()
     try:
         test.failIf(True, "Fail test")
     except TestFailError:
         pass
     except:
         self.failIf(True)
     else:
         self.failIf(True)
Ejemplo n.º 5
0
 def testAbortIfExec(self):
     test = TestExec()
     try:
         test.abortIf(True, "Abort test")
     except TestAbortError:
         pass
     except:
         self.failIf(True)
     else:
         self.failIf(True)
Ejemplo n.º 6
0
 def testFailThisExec(self):
     test = TestExec()
     try:
         test.failThis(False, "Fail this test")
     except TestFailThisError:
         pass
     except:
         self.failIf(True)
     else:
         self.failIf(True)
Ejemplo n.º 7
0
 def testPassAbortIfExec(self):
     test = TestExec()
     try:
         test.abortIf(False, "Abort test")
     except:
         self.failIf(True)
Ejemplo n.º 8
0
 def testExchangeInfoTwoCases(self):
     device = FakeDevice()
     context = DeviceContext(device, TestTasker(Suite1()))
     context.run(TestExec(), FakeTestResult())
     self.failUnless(getattr(device, "failure", False))
Ejemplo n.º 9
0
 def testExchangeInfoOneCase(self):
     device = FakeDevice()
     context = DeviceContext(device, TestTasker(Suite1("case1")))
     context.run(TestExec(), FakeTestResult())
     self.failIf(getattr(device, "failure", False))
Ejemplo n.º 10
0
 def testPassFailThisIfExec(self):
     test = TestExec()
     try:
         test.failThisIf(False, "Fail this test")
     except:
         self.failIf(True)
Ejemplo n.º 11
0
 def testPassFailExec(self):
     test = TestExec()
     try:
         test.fail(True, "Fail test")
     except:
         self.failIf(True)
Ejemplo n.º 12
0
 def testPassAbortIfExec(self):
     test = TestExec()
     try:
         test.abortIf(False, "Abort test")
     except:
         self.failIf(True)
Ejemplo n.º 13
0
 def testPassFailThisIfExec(self):
     test = TestExec()
     try:
         test.failThisIf(False, "Fail this test")
     except:
         self.failIf(True)
Ejemplo n.º 14
0
 def testPassFailExec(self):
     test = TestExec()
     try:
         test.fail(True, "Fail test")
     except:
         self.failIf(True)