34 PKG =
'test_roslaunch' 37 import os, sys, unittest
45 if '--noenv' in sys.argv:
46 self.assertEquals(
None, os.environ.get(
'TEST_ENV',
None))
47 self.assertEquals(
None, os.environ.get(
'TEST_ENV_SUBSTITUTION',
None))
49 self.assertEquals(
'test env', os.environ.get(
'TEST_ENV',
None))
50 rospack = rospkg.RosPack()
51 path1 = os.path.join(rospack.get_path(
'roslaunch'),
'src')
52 path2 = os.environ.get(
'TEST_ENV_SUBSTITUTION',
None)
53 self.assertEquals(os.path.abspath(path1), os.path.abspath(path2))
55 if __name__ ==
'__main__':
56 rostest.rosrun(PKG, NAME, TestEnv)
Test Roslaunch 'env' tags.