Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
TestSuite Class Reference

Public Member Functions

None __init__ (self, str test_directory, Options options)
 
'TestSuite__enter__ (self)
 
None __exit__ (self, _exc_type, _exc_value, _traceback)
 
TestCase test_case (self, str test_basename)
 
None __init__ (self, str test_directory, Options options)
 
'TestSuite__enter__ (self)
 
None __exit__ (self, _exc_type, _exc_value, _traceback)
 
TestCase test_case (self, str test_basename)
 

Protected Member Functions

None _remove_scratch_dir (self, str dir)
 
None _setup_once (self)
 
None _teardown_once (self)
 
None _setup (self, str test_basename)
 
None _teardown (self, str test_basename)
 
None _run_script (self, str script, str cwd)
 
None _remove_scratch_dir (self, str dir)
 
None _setup_once (self)
 
None _teardown_once (self)
 
None _setup (self, str test_basename)
 
None _teardown (self, str test_basename)
 
None _run_script (self, str script, str cwd)
 

Protected Attributes

 _opts = options
 
 _test_dir = os.path.abspath(test_directory)
 
 _scratch_dir = os.path.normpath(os.path.join(self._opts.scratch_dir, rel_test_dir))
 

Detailed Description

Setup & teardown test suite & cases.
This class is intended to be used as a context manager.

TODO: Make setup/teardown failure emit messages, not throw exceptions.

Constructor & Destructor Documentation

◆ __init__() [1/2]

None __init__ ( self,
str test_directory,
Options options )

◆ __init__() [2/2]

None __init__ ( self,
str test_directory,
Options options )

Member Function Documentation

◆ __enter__() [1/2]

'TestSuite' __enter__ ( self)

◆ __enter__() [2/2]

'TestSuite' __enter__ ( self)

◆ __exit__() [1/2]

None __exit__ ( self,
_exc_type,
_exc_value,
_traceback )

◆ __exit__() [2/2]

None __exit__ ( self,
_exc_type,
_exc_value,
_traceback )

◆ _remove_scratch_dir() [1/2]

None _remove_scratch_dir ( self,
str dir )
protected
Helper to remove a scratch directory with sanity checks

◆ _remove_scratch_dir() [2/2]

None _remove_scratch_dir ( self,
str dir )
protected
Helper to remove a scratch directory with sanity checks

◆ _run_script() [1/2]

None _run_script ( self,
str script,
str cwd )
protected

◆ _run_script() [2/2]

None _run_script ( self,
str script,
str cwd )
protected

◆ _setup() [1/2]

None _setup ( self,
str test_basename )
protected

◆ _setup() [2/2]

None _setup ( self,
str test_basename )
protected

◆ _setup_once() [1/2]

None _setup_once ( self)
protected

◆ _setup_once() [2/2]

None _setup_once ( self)
protected

◆ _teardown() [1/2]

None _teardown ( self,
str test_basename )
protected

◆ _teardown() [2/2]

None _teardown ( self,
str test_basename )
protected

◆ _teardown_once() [1/2]

None _teardown_once ( self)
protected

◆ _teardown_once() [2/2]

None _teardown_once ( self)
protected

◆ test_case() [1/2]

TestCase test_case ( self,
str test_basename )
Context manager for a test case in the test suite.
Pass the basename of the test relative to the :test_directory:.

◆ test_case() [2/2]

TestCase test_case ( self,
str test_basename )
Context manager for a test case in the test suite.
Pass the basename of the test relative to the :test_directory:.

Field Documentation

◆ _opts

_opts = options
protected

◆ _scratch_dir

_scratch_dir = os.path.normpath(os.path.join(self._opts.scratch_dir, rel_test_dir))
protected

◆ _test_dir

_test_dir = os.path.abspath(test_directory)
protected

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