Issue #312 duplicate

how do I run parallel mode via API?

Anonymous created an issue

My flow goes like this:

  cov = coverage.coverage(data_suffix=True)
  cov.start()
  suite = unittest.defaultTestLoader.discover(...)
  suite = ConcurrentTestSuite(suite, fork_for_tests(4))  # os.fork 4 subprocesses
  unittest.TextTestRunner().run(suite)
  cov.stop()
  cov.combine()
  cov.save()

My suite does a lot of forks (via http://coreygoldberg.blogspot.com/2013/06/python-concurrencytest-running.html).

I thought setting data_suffix=True would force the parallel runs, yet I get different coverage results depending if I os.fork the runs or not.

Comments (7)

  1. Log in to comment