X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0c847cae0cb8ad2c55cf9330b84b49ce9d54b4e8..093ec98e4a065acfc537ea22c08c337c115fe273:/sdk/cwl/tests/test_pathmapper.py diff --git a/sdk/cwl/tests/test_pathmapper.py b/sdk/cwl/tests/test_pathmapper.py index cbd5ba1bc1..194092db7a 100644 --- a/sdk/cwl/tests/test_pathmapper.py +++ b/sdk/cwl/tests/test_pathmapper.py @@ -238,3 +238,16 @@ class TestPathmap(unittest.TestCase): p._pathmap["keep:99999999999999999999999999999991+99/hw.py"] = True p._pathmap["_:123"] = True self.assertTrue(p.needs_new_collection(a)) + + def test_is_in_collection(self): + arvrunner = arvados_cwl.executor.ArvCwlExecutor(self.api) + self.maxDiff = 1000000 + + cwd = os.getcwd() + p = ArvPathMapper(arvrunner, [{ + "class": "File", + "location": "file://"+cwd+"/tests/fake-keep-mount/fake_collection_dir/subdir/banana.txt" + }], "", "/test/%s", "/test/%s/%s") + + self.assertEqual({"file://"+cwd+"/tests/fake-keep-mount/fake_collection_dir/subdir/banana.txt": MapperEnt(resolved='keep:99999999999999999999999999999991+99/subdir/banana.txt', target='/test/99999999999999999999999999999991+99/subdir/banana.txt', type='File', staged=True)}, + p._pathmap)