Skip to content

how do I run parallel mode via API? #312

Closed
@nedbat

Description

@nedbat

Originally reported by Anonymous


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.


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcombine

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions