MCPcopy Create free account
hub / github.com/Yelp/mrjob / assertScriptDownloads

Method assertScriptDownloads

tests/test_emr.py:1554–1570  ·  view source on GitHub ↗
(path, name=None)

Source from the content-addressed store, hash-verified

1552 self.assertIn('} 1>&2', lines)
1553
1554 def assertScriptDownloads(path, name=None):
1555 uri = runner._upload_mgr.uri(path)
1556 name = runner._bootstrap_dir_mgr.name('file', path, name=name)
1557
1558 if image_version and not version_gte(image_version, '4'):
1559 self.assertIn(
1560 ' hadoop fs -copyToLocal %s $__mrjob_PWD/%s' % (
1561 uri, name),
1562 lines)
1563 else:
1564 self.assertIn(
1565 ' aws s3 cp %s $__mrjob_PWD/%s' % (uri, name),
1566 lines)
1567
1568 self.assertIn(
1569 ' chmod u+rx $__mrjob_PWD/%s' % (name,),
1570 lines)
1571
1572 # check files get downloaded
1573 assertScriptDownloads(foo_py_path, 'bar.py')

Callers

nothing calls this directly

Calls 3

version_gteFunction · 0.90
uriMethod · 0.80
nameMethod · 0.80

Tested by

no test coverage detected