def test_main(max_subprocess_count=_DEFAULT_MAX_SUBPROCESS_COUNT,
              barrier_parties=0):
  """Main function to be called within `__main__` of a test file.

  Args:
    max_subprocess_count: Maximum number of subprocesses that will be used. User
      of multi_process_runner needs to determine a number at calling this
      method, and the subprocesses involved later should not exceed this number.
    barrier_parties: Number of parties the barrier will be used toward. User of
      multi_process_runner needs to determine a number at calling this method.
  """
  with multi_process_lib.context_manager(max_subprocess_count, barrier_parties):
    test.main()
Esempio n. 2
0
def test_main():
    """Main function to be called within `__main__` of a test file."""
    with multi_process_lib.context_manager():
        test.main()