gtagency / pyrostest

A library for testing ROS systems using python test frameworks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add some more robust tests

joshuamorton opened this issue · comments

The tests currently in test/pyroestest/test_system.py won't give useful error messages, and may pass for the wrong reasons. While they're a good smoke test, we should add another set of tests that follows a pattern like

class TestSystem(unittest.Testcase):
    class InternalTester(unittest.TestCase):
        @decorators
        def test_function(self, stuff)
    self._testcase = InternalTester
    def test_testcase(self):
        with self.assertRaises(CorrectException):
            self._testcase.test_function()

Some more meat to it than that (correctly running the test contextually) but that's the idea.