Пример #1
0
 def testFailIfExec(self):
     test = TestExec()
     try:
         test.failIf(True, "Fail test")
     except TestFailError:
         pass
     except:
         self.failIf(True)
     else:
         self.failIf(True)
Пример #2
0
 def testAbortIfExec(self):
     test = TestExec()
     try:
         test.abortIf(True, "Abort test")
     except TestAbortError:
         pass
     except:
         self.failIf(True)
     else:
         self.failIf(True)
Пример #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)
Пример #4
0
 def testFailIfExec(self):
     test = TestExec()
     try:
         test.failIf(True, "Fail test")
     except TestFailError:
         pass
     except:
         self.failIf(True)
     else:
         self.failIf(True)
Пример #5
0
 def testAbortIfExec(self):
     test = TestExec()
     try:
         test.abortIf(True, "Abort test")
     except TestAbortError:
         pass
     except:
         self.failIf(True)
     else:
         self.failIf(True)
Пример #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)
Пример #7
0
 def testPassAbortIfExec(self):
     test = TestExec()
     try:
         test.abortIf(False, "Abort test")
     except:
         self.failIf(True)
Пример #8
0
 def testExchangeInfoTwoCases(self):
     device = FakeDevice()
     context = DeviceContext(device, TestTasker(Suite1()))
     context.run(TestExec(), FakeTestResult())
     self.failUnless(getattr(device, "failure", False))
Пример #9
0
 def testExchangeInfoOneCase(self):
     device = FakeDevice()
     context = DeviceContext(device, TestTasker(Suite1("case1")))
     context.run(TestExec(), FakeTestResult())
     self.failIf(getattr(device, "failure", False))
Пример #10
0
 def testPassFailThisIfExec(self):
     test = TestExec()
     try:
         test.failThisIf(False, "Fail this test")
     except:
         self.failIf(True)
Пример #11
0
 def testPassFailExec(self):
     test = TestExec()
     try:
         test.fail(True, "Fail test")
     except:
         self.failIf(True)
Пример #12
0
 def testPassAbortIfExec(self):
     test = TestExec()
     try:
         test.abortIf(False, "Abort test")
     except:
         self.failIf(True)
Пример #13
0
 def testPassFailThisIfExec(self):
     test = TestExec()
     try:
         test.failThisIf(False, "Fail this test")
     except:
         self.failIf(True)
Пример #14
0
 def testPassFailExec(self):
     test = TestExec()
     try:
         test.fail(True, "Fail test")
     except:
         self.failIf(True)