1 import resource_retriever
as r
5 from nose.tools
import raises
7 rospack = rospkg.RosPack()
10 res = r.get(
"package://resource_retriever/test/test.txt")
12 assert res ==
'A'.encode()
15 res_path = os.path.join(rospack.get_path(
"resource_retriever"),
"test/large_filepy.dat")
16 with open(res_path,
'w')
as f:
17 for _
in range(1024*1024*50):
19 res = r.get(
"package://resource_retriever/test/large_filepy.dat")
20 assert len(res) == 1024*1024*50
23 res = r.get(
"http://packages.ros.org/ros.key")
32 r.get(
"package://roscpp")
34 @raises(rospkg.common.ResourceNotFound)
36 r.get(
"package://invalid_package_blah/test.xml")
def test_invalid_package()
def test_get_by_package()
def test_get_large_file()