ab = abspath(src, self.input_basedir)
st = arvados.commands.run.statfile("", ab,
fnPattern="keep:%s/%s",
- dirPattern="keep:%s/%s")
+ dirPattern="keep:%s/%s",
+ raiseOSError=True)
with SourceLine(srcobj, "location", WorkflowException):
if isinstance(st, arvados.commands.run.UploadFile):
uploadfiles.add((src, ab, st))
'schema-salad==2.5.20170428142041',
'typing==3.5.3.0',
'ruamel.yaml==0.13.7',
- 'arvados-python-client>=0.1.20170523195205',
+ 'arvados-python-client>=0.1.20170526013812',
'setuptools'
],
data_files=[
self.assertEqual({'file:tests/hw.py': MapperEnt(resolved='keep:99999999999999999999999999999991+99/hw.py', target='/test/99999999999999999999999999999991+99/hw.py', type='File', staged=True)},
p._pathmap)
+
+ @mock.patch("os.stat")
+ def test_missing_file(self, stat):
+ """Test pathmapper handling missing references."""
+ arvrunner = arvados_cwl.ArvCwlRunner(self.api)
+
+ stat.side_effect = OSError(2, "No such file or directory")
+
+ with self.assertRaises(OSError):
+ p = ArvPathMapper(arvrunner, [{
+ "class": "File",
+ "location": "file:tests/hw.py"
+ }], "", "/test/%s", "/test/%s/%s")