Public Member Functions | |
def | __init__ (self, *args, **kwargs) |
def | mkfile (self, suffix) |
def | setUp (self) |
def | tearDown (self) |
def | test_bag_attributes (self) |
def | test_bag_parameters (self) |
def | test_bag_rw_grep (self) |
def | test_global_library (self) |
def | test_rollover (self) |
def | verify_bag_attributes (self, bagcls, infilename, outfilename) |
def | verify_bag_parameters_read (self, bagcls, filename) |
def | verify_bag_parameters_write (self, bagcls, filename) |
def | verify_grep (self) |
def | verify_sources_sinks (self) |
![]() | |
def | create_publisher (self, topic, cls) |
def | init_node (self) |
def | run_command (self, communicate=True) |
def | run_rostest (cls) |
def | shutdown_node (self) |
def | spin_once (self, timeout) |
def | subTest (self, msg=None, **params) |
def | verify_bags (self) |
def | verify_topics (self, topics, messages=None) |
Static Public Attributes | |
NAME = os.path.splitext(os.path.basename(__file__))[0] | |
Test name used in flow logging. More... | |
string | OUTPUT_LABEL = "various sinks" |
Name used in flow logging. More... | |
OUTPUT_SUFFIX = testbase.TestBase.BAG_SUFFIX | |
Suffix for write output file, if any. More... | |
![]() | |
string | BAG_SUFFIX = "1" else ".db3" |
ROS bagfile extension. More... | |
list | CMD_BASE = ["grepros"] + SEARCH_WORDS + \ |
Base command for running grepros. More... | |
DATA_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "data")) | |
Test bags directory. More... | |
list | EXPECTED_TOPIC_BASES = ["/match/this/intarray", "/match/this/header"] |
Topics expected in output, bag name appended. More... | |
list | EXPECTED_WORDS = ["match_this"] |
Words expected in matched messages, bag name appended. More... | |
string | INPUT_LABEL = "ROS bags" |
Name used in flow logging. More... | |
string | NAME = "" |
Test name used in flow logging. More... | |
string | OUTPUT_LABEL = "" |
Name used in flow logging. More... | |
OUTPUT_SUFFIX = None | |
Suffix for write output file, if any. More... | |
list | SEARCH_WORDS = ["this"] |
Words searched in bag. More... | |
list | SKIPPED_TOPIC_BASES = ["/not/this/intarray", "/match/this/not"] |
Topics not expected in output, bag name appended. More... | |
list | SKIPPED_WORDS = ["not_this"] |
Words not expected in matched messages, bag name appended. More... | |
Private Attributes | |
_outfile | |
_tempnames | |
Additional Inherited Members | |
![]() | |
maxDiff | |
Tests using grepros main functions and classes as a library.
Definition at line 36 of file test_library.py.
def test.test_library.TestLibrary.__init__ | ( | self, | |
* | args, | ||
** | kwargs | ||
) |
Reimplemented from test.testbase.TestBase.
Definition at line 49 of file test_library.py.
def test.test_library.TestLibrary.mkfile | ( | self, | |
suffix | |||
) |
Returns temporary filename with given suffix, deleted in teardown.
Definition at line 481 of file test_library.py.
def test.test_library.TestLibrary.setUp | ( | self | ) |
Collects and verifies bags in data directory.
Reimplemented from test.testbase.TestBase.
Definition at line 54 of file test_library.py.
def test.test_library.TestLibrary.tearDown | ( | self | ) |
Deletes temporary output files, if any.
Reimplemented from test.testbase.TestBase.
Definition at line 61 of file test_library.py.
def test.test_library.TestLibrary.test_bag_attributes | ( | self | ) |
Tests Bag class general interface.
Definition at line 94 of file test_library.py.
def test.test_library.TestLibrary.test_bag_parameters | ( | self | ) |
Tests parameters to Bag functions.
Definition at line 168 of file test_library.py.
def test.test_library.TestLibrary.test_bag_rw_grep | ( | self | ) |
Tests reading and writing bags and matching messages.
Definition at line 69 of file test_library.py.
def test.test_library.TestLibrary.test_global_library | ( | self | ) |
Tests grepros global functions: init(), grep(), source(), sink().
Definition at line 339 of file test_library.py.
def test.test_library.TestLibrary.test_rollover | ( | self | ) |
Tests rollover settings for sinks.
Definition at line 346 of file test_library.py.
def test.test_library.TestLibrary.verify_bag_attributes | ( | self, | |
bagcls, | |||
infilename, | |||
outfilename | |||
) |
Tests general interface for given bag class.
Definition at line 103 of file test_library.py.
def test.test_library.TestLibrary.verify_bag_parameters_read | ( | self, | |
bagcls, | |||
filename | |||
) |
Tests parameters to read functions of given Bag class.
Definition at line 179 of file test_library.py.
def test.test_library.TestLibrary.verify_bag_parameters_write | ( | self, | |
bagcls, | |||
filename | |||
) |
Tests parameters to write functions of given Bag class.
Definition at line 305 of file test_library.py.
def test.test_library.TestLibrary.verify_grep | ( | self | ) |
Tests grepros.grep().
Definition at line 392 of file test_library.py.
def test.test_library.TestLibrary.verify_sources_sinks | ( | self | ) |
Tests general Source and Sink API.
Definition at line 412 of file test_library.py.
|
private |
Definition at line 86 of file test_library.py.
|
private |
Definition at line 51 of file test_library.py.
|
static |
Test name used in flow logging.
Definition at line 40 of file test_library.py.
|
static |
Name used in flow logging.
Definition at line 43 of file test_library.py.
|
static |
Suffix for write output file, if any.
Definition at line 46 of file test_library.py.