def test_importlib_import_relative_class_raises(self):
assert __package__
with self.assertRaises(ImportError):
importlib.__import__('msg.TestMsg', globals=globals(), level=1)
# TODO
# def test_double_import_uses_cache(self): #
# print_importers()
# # Verify that files exists and are importable
# import std_msgs.msg as std_msgs
#
# self.assertTrue(std_msgs.Bool is not None)
# self.assertTrue(callable(std_msgs.Bool))
# self.assertTrue(std_msgs.Bool._type == 'std_msgs/Bool')
#
# import std_msgs.msg as std_msgs2
#
# self.assertTrue(std_msgs == std_msgs2)
test_rosmsg_importlib_import.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录