def test_parse_bad_file(self): from roslib.manifest import parse_file, Manifest # have to import from ManifestException due to weirdness when run in --cov mode from roslib.manifestlib import ManifestException base_p = os.path.join(get_test_path(), 'manifest_tests') for b in ['bad1.xml', 'bad2.xml', 'bad3.xml']: p = os.path.join(base_p, b) try: parse_file(p) self.fail("parse should have failed on bad manifest") except ManifestException, e: print str(e) self.assert_(b in str(e), "file name should be in error message: %s"%(str(e)))
def test_parse_bad_file(self): from roslib.manifest import parse_file, Manifest # have to import from ManifestException due to weirdness when run in --cov mode from roslib.manifestlib import ManifestException base_p = os.path.join(get_test_path(), 'manifest_tests') for b in ['bad1.xml', 'bad2.xml', 'bad3.xml']: p = os.path.join(base_p, b) try: parse_file(p) self.fail("parse should have failed on bad manifest") except ManifestException as e: print(str(e)) self.assert_(b in str(e), "file name should be in error message: %s"%(str(e)))
def test_parse_example1_file(self): from roslib.manifest import parse_file p = os.path.join(get_test_path(), 'manifest_tests', 'example1.xml') self._subtest_parse_example1(parse_file(p))
def test_parse_example1_file(self): from roslib.manifest import parse_file, Manifest p = os.path.join(get_test_path(), 'manifest_tests', 'example1.xml') self._subtest_parse_example1(parse_file(p))
def test_parse_example1_file(self): from roslib.manifest import parse_file, Manifest p = os.path.join(roslib.packages.get_pkg_dir('test_roslib'), 'test', 'manifest_tests', 'example1.xml') self._subtest_parse_example1(parse_file(p))