A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
TestBase.TestBaseClass Class Reference

TestBaseClass class. More...

Public Member Functions

 __init__ (self, argv, desc, mode)
 Provide input argument list, description and mode of the suite being executed.
 
 override_cmds (self)
 Can be used by importing suite to handle custom commands.
 
 parseargs (self, argv, desc)
 Parses the commandline arguments.
 
 runtests (self, cmds)
 Execute the tests.
 

Public Attributes

 mode
 mode
 
 my_env
 os environment
 
 options
 options
 
 outfile
 output file
 

Detailed Description

TestBaseClass class.

Generic class for testing tools based on provided commands and test cases.

Definition at line 50 of file TestBase.py.

Constructor & Destructor Documentation

◆ __init__()

TestBase.TestBaseClass.__init__ ( self,
argv,
desc,
mode )

Provide input argument list, description and mode of the suite being executed.

Parameters
selfthis object
argvargument list
descdescription
modetest mode

Definition at line 64 of file TestBase.py.

Member Function Documentation

◆ override_cmds()

TestBase.TestBaseClass.override_cmds ( self)

Can be used by importing suite to handle custom commands.

Parameters
selfthis object
Returns
custom commands

Definition at line 123 of file TestBase.py.

References TestBase.TestBaseClass.options.

◆ parseargs()

TestBase.TestBaseClass.parseargs ( self,
argv,
desc )

Parses the commandline arguments.

Parameters
selfthis object
argvargument list
descdescription
Returns
command line arguments

Definition at line 79 of file TestBase.py.

References TestBase.TestBaseClass.outfile.

◆ runtests()

TestBase.TestBaseClass.runtests ( self,
cmds )

Execute the tests.

Parameters
selfthis object
cmdstest commands
Returns
error code

Definition at line 131 of file TestBase.py.

References TestBase.TestBaseClass.my_env, TestBase.TestBaseClass.options, TestBase.print_case_in_file(), TestBase.print_cmds(), and TestBase.print_failed_cases().

+ Here is the call graph for this function:

Member Data Documentation

◆ mode

TestBase.TestBaseClass.mode

mode

Definition at line 75 of file TestBase.py.

◆ my_env

TestBase.TestBaseClass.my_env

os environment

Definition at line 72 of file TestBase.py.

Referenced by TestBase.TestBaseClass.runtests().

◆ options

TestBase.TestBaseClass.options

options

Definition at line 77 of file TestBase.py.

Referenced by TestBase.TestBaseClass.override_cmds(), and TestBase.TestBaseClass.runtests().

◆ outfile

TestBase.TestBaseClass.outfile

output file

Definition at line 76 of file TestBase.py.

Referenced by TestBase.TestBaseClass.parseargs().


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