Back to index

python3.2  3.2.2
Public Member Functions
ctypes.test.TestRunner Class Reference
Inheritance diagram for ctypes.test.TestRunner:
Inheritance graph
[legend]
Collaboration diagram for ctypes.test.TestRunner:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def run

Detailed Description

Definition at line 115 of file __init__.py.


Member Function Documentation

def ctypes.test.TestRunner.run (   self,
  test,
  skipped 
)

Definition at line 116 of file __init__.py.

00116 
00117     def run(self, test, skipped):
00118         "Run the given test case or test suite."
00119         # Same as unittest.TextTestRunner.run, except that it reports
00120         # skipped tests.
00121         result = self._makeResult()
00122         startTime = time.time()
00123         test(result)
00124         stopTime = time.time()
00125         timeTaken = stopTime - startTime
00126         result.printErrors()
00127         self.stream.writeln(result.separator2)
00128         run = result.testsRun
00129         if _unavail: #skipped:
00130             requested = list(_unavail.keys())
00131             requested.sort()
00132             self.stream.writeln("Ran %d test%s in %.3fs (%s module%s skipped)" %
00133                                 (run, run != 1 and "s" or "", timeTaken,
00134                                  len(skipped),
00135                                  len(skipped) != 1 and "s" or ""))
00136             self.stream.writeln("Unavailable resources: %s" % ", ".join(requested))
00137         else:
00138             self.stream.writeln("Ran %d test%s in %.3fs" %
00139                                 (run, run != 1 and "s" or "", timeTaken))
00140         self.stream.writeln()
00141         if not result.wasSuccessful():
00142             self.stream.write("FAILED (")
00143             failed, errored = map(len, (result.failures, result.errors))
00144             if failed:
00145                 self.stream.write("failures=%d" % failed)
00146             if errored:
00147                 if failed: self.stream.write(", ")
00148                 self.stream.write("errors=%d" % errored)
00149             self.stream.writeln(")")
00150         else:
00151             self.stream.writeln("OK")
00152         return result
00153 

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: