コード例 #1
0
ファイル: test_batch.py プロジェクト: populationgenomics/hail
 def test_large_command(self):
     backend = ServiceBackend(
         remote_tmpdir=f'gs://{HAIL_TEST_GCS_BUCKET}/temporary-files')
     b = Batch(backend=backend)
     j1 = b.new_job()
     long_str = secrets.token_urlsafe(15 * 1024)
     j1.command(f'echo "{long_str}"')
     b.run()
コード例 #2
0
ファイル: test_batch.py プロジェクト: populationgenomics/hail
 def test_service_backend_bucket_parameter(self):
     backend = ServiceBackend(bucket=HAIL_TEST_GCS_BUCKET)
     b = Batch(backend=backend)
     j1 = b.new_job()
     j1.command(f'echo hello > {j1.ofile}')
     j2 = b.new_job()
     j2.command(f'cat {j1.ofile}')
     b.run()
コード例 #3
0
ファイル: test_batch.py プロジェクト: populationgenomics/hail
 def test_service_backend_remote_tempdir_with_no_trailing_slash(self):
     backend = ServiceBackend(
         remote_tmpdir=f'gs://{HAIL_TEST_GCS_BUCKET}/temporary-files/')
     b = Batch(backend=backend)
     j1 = b.new_job()
     j1.command(f'echo hello > {j1.ofile}')
     j2 = b.new_job()
     j2.command(f'cat {j1.ofile}')
     b.run()
コード例 #4
0
ファイル: test_batch.py プロジェクト: chrisvittal/hail
 def test_big_batch_which_uses_slow_path(self):
     backend = ServiceBackend(
         remote_tmpdir=f'{self.remote_tmpdir}/temporary-files')
     b = Batch(backend=backend)
     # 8 * 256 * 1024 = 2 MiB > 1 MiB max bunch size
     for i in range(8):
         j1 = b.new_job()
         long_str = secrets.token_urlsafe(256 * 1024)
         j1.command(f'echo "{long_str}"')
     batch = b.run()
     assert not batch.submission_info.used_fast_create
     batch_status = batch.status()
     assert batch_status['state'] == 'success', str((batch.debug_info()))
コード例 #5
0
 def test_backend_context_manager(self):
     with LocalBackend() as backend:
         b = Batch(backend=backend)
         b.run()