Skip to content

Instantly share code, notes, and snippets.

@drofp
Created December 2, 2018 11:50
Show Gist options
  • Save drofp/42b01ae18c615d8b78d489c365410e3a to your computer and use it in GitHub Desktop.
Save drofp/42b01ae18c615d8b78d489c365410e3a to your computer and use it in GitHub Desktop.
Attempt at test suite in ros
#!/usr/bin/env python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
import unittest
import rostest
from . import test_geodesy, test_gps_parser
PKG = "geodesy"
NAME = "test_geodesy_module"
# class TestGeodesyModule(unittest.TestSuite):
# """Test suite for entire geodesy package."""
# def __init__(self):
# super(TestGeodesyModule, self).__init__()
# self.addTest(test_geodesy.TestGeodesy())
# self.addTest(test_gps_parser.TestGpsParser())
# initialize the test suite
loader = unittest.TestLoader()
suite = unittest.TestSuite()
suite.addTest(loader.loadTestsFromModule(test_geodesy.TestGeodesy()))
suite.addTest(loader.loadTestsFromModule(test_gps_parser.TestGpsParser()))
rostest.rosrun(PKG, NAME, suite)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment