Show More
@@ -1076,6 +1076,7 b' class TestRunner(object):' | |||
|
1076 | 1076 | '~': [], |
|
1077 | 1077 | 's': [], |
|
1078 | 1078 | 'i': [], |
|
1079 | 'u': [], | |
|
1079 | 1080 | } |
|
1080 | 1081 | self.abort = [False] |
|
1081 | 1082 | self._createdfiles = [] |
@@ -1534,14 +1535,24 b' class TestRunner(object):' | |||
|
1534 | 1535 | os.mkdir(adir) |
|
1535 | 1536 | covrun('-i', '-a', '"--directory=%s"' % adir, '"--omit=%s"' % omit) |
|
1536 | 1537 | |
|
1537 | def _executetests(self, tests): | |
|
1538 | def _executetests(self, tests, result=None): | |
|
1539 | # We copy because we modify the list. | |
|
1540 | tests = list(tests) | |
|
1541 | ||
|
1538 | 1542 | jobs = self.options.jobs |
|
1539 | 1543 | done = queue.Queue() |
|
1540 | 1544 | running = 0 |
|
1541 | 1545 | |
|
1542 | def job(test): | |
|
1546 | def job(test, result): | |
|
1543 | 1547 | try: |
|
1544 |
|
|
|
1548 | # If in unittest mode. | |
|
1549 | if result: | |
|
1550 | test(result) | |
|
1551 | # We need to put something here to make the logic happy. | |
|
1552 | # This will get cleaned up later. | |
|
1553 | done.put(('u', None, None)) | |
|
1554 | else: | |
|
1555 | done.put(test.run()) | |
|
1545 | 1556 | test.cleanup() |
|
1546 | 1557 | except KeyboardInterrupt: |
|
1547 | 1558 | pass |
@@ -1565,7 +1576,7 b' class TestRunner(object):' | |||
|
1565 | 1576 | if self.options.loop: |
|
1566 | 1577 | tests.append(test) |
|
1567 | 1578 | t = threading.Thread(target=job, name=test.name, |
|
1568 |
args= |
|
|
1579 | args=(test, result)) | |
|
1569 | 1580 | t.start() |
|
1570 | 1581 | running += 1 |
|
1571 | 1582 | except KeyboardInterrupt: |
General Comments 0
You need to be logged in to leave comments.
Login now