Show More
@@ -1153,11 +1153,15 b' class TestResult(unittest._TextTestResul' | |||||
1153 | class TestSuite(unittest.TestSuite): |
|
1153 | class TestSuite(unittest.TestSuite): | |
1154 | """Custom unitest TestSuite that knows how to execute Mercurial tests.""" |
|
1154 | """Custom unitest TestSuite that knows how to execute Mercurial tests.""" | |
1155 |
|
1155 | |||
1156 |
def __init__(self, |
|
1156 | def __init__(self, testdir, jobs=1, whitelist=None, blacklist=None, | |
1157 | retest=False, keywords=None, loop=False, |
|
1157 | retest=False, keywords=None, loop=False, | |
1158 | *args, **kwargs): |
|
1158 | *args, **kwargs): | |
1159 | """Create a new instance that can run tests with a configuration. |
|
1159 | """Create a new instance that can run tests with a configuration. | |
1160 |
|
1160 | |||
|
1161 | testdir specifies the directory where tests are executed from. This | |||
|
1162 | is typically the ``tests`` directory from Mercurial's source | |||
|
1163 | repository. | |||
|
1164 | ||||
1161 | jobs specifies the number of jobs to run concurrently. Each test |
|
1165 | jobs specifies the number of jobs to run concurrently. Each test | |
1162 | executes on its own thread. Tests actually spawn new processes, so |
|
1166 | executes on its own thread. Tests actually spawn new processes, so | |
1163 | state mutation should not be an issue. |
|
1167 | state mutation should not be an issue. | |
@@ -1179,7 +1183,6 b' class TestSuite(unittest.TestSuite):' | |||||
1179 | """ |
|
1183 | """ | |
1180 | super(TestSuite, self).__init__(*args, **kwargs) |
|
1184 | super(TestSuite, self).__init__(*args, **kwargs) | |
1181 |
|
1185 | |||
1182 | self._runner = runner |
|
|||
1183 | self._jobs = jobs |
|
1186 | self._jobs = jobs | |
1184 | self._whitelist = whitelist |
|
1187 | self._whitelist = whitelist | |
1185 | self._blacklist = blacklist |
|
1188 | self._blacklist = blacklist | |
@@ -1509,7 +1512,8 b' class TestRunner(object):' | |||||
1509 | failed = False |
|
1512 | failed = False | |
1510 | warned = False |
|
1513 | warned = False | |
1511 |
|
1514 | |||
1512 |
suite = TestSuite(self |
|
1515 | suite = TestSuite(self.testdir, | |
|
1516 | jobs=self.options.jobs, | |||
1513 | whitelist=self.options.whitelisted, |
|
1517 | whitelist=self.options.whitelisted, | |
1514 | blacklist=self.options.blacklist, |
|
1518 | blacklist=self.options.blacklist, | |
1515 | retest=self.options.retest, |
|
1519 | retest=self.options.retest, |
General Comments 0
You need to be logged in to leave comments.
Login now