OpenStructure
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Properties
XMLTestRunner Class Reference

Inherits object.

Public Member Functions

 __init__ (self, stream=None)
 
 run (self, test)
 

Protected Member Functions

 _set_path (self, path)
 

Protected Attributes

 _stream
 
 _path
 
 _orig_stdout
 
 _orig_stderr
 

Properties

 path
 

Detailed Description

A test runner that stores results in XML format compatible with JUnit.

XMLTestRunner(stream=None) -> XML test runner

The XML file is written to the supplied stream. If stream is None, the
results are stored in a file called TEST-<module>.<class>.xml in the
current working directory (if not overridden with the path property),
where <module> and <class> are the module and class name of the test class.

Definition at line 154 of file xmlrunner.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
  stream = None 
)

Definition at line 167 of file xmlrunner.py.

Member Function Documentation

◆ _set_path()

_set_path (   self,
  path 
)
protected

Definition at line 211 of file xmlrunner.py.

◆ run()

run (   self,
  test 
)
Run the given test case or test suite.

Definition at line 171 of file xmlrunner.py.

Field Documentation

◆ _orig_stderr

_orig_stderr
protected

Definition at line 187 of file xmlrunner.py.

◆ _orig_stdout

_orig_stdout
protected

Definition at line 186 of file xmlrunner.py.

◆ _path

_path
protected

Definition at line 169 of file xmlrunner.py.

◆ _stream

_stream
protected

Definition at line 168 of file xmlrunner.py.

Property Documentation

◆ path

path
static
Initial value:
= property(lambda self: self._path, _set_path, None,
)

Definition at line 214 of file xmlrunner.py.


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