##// END OF EJS Templates
run-tests: teach Test instances whether they are in unittest mode...
Gregory Szorc -
r21434:a264fca9 default
parent child Browse files
Show More
@@ -347,7 +347,7 b' class Test(object):'
347 # Status code reserved for skipped tests (used by hghave).
347 # Status code reserved for skipped tests (used by hghave).
348 SKIPPED_STATUS = 80
348 SKIPPED_STATUS = 80
349
349
350 def __init__(self, runner, test, count, refpath):
350 def __init__(self, runner, test, count, refpath, unittest=False):
351 path = os.path.join(runner.testdir, test)
351 path = os.path.join(runner.testdir, test)
352 errpath = os.path.join(runner.testdir, '%s.err' % test)
352 errpath = os.path.join(runner.testdir, '%s.err' % test)
353
353
@@ -360,6 +360,7 b' class Test(object):'
360 self._daemonpids = []
360 self._daemonpids = []
361 self._refpath = refpath
361 self._refpath = refpath
362 self._errpath = errpath
362 self._errpath = errpath
363 self._unittest = unittest
363
364
364 # If we're not in --debug mode and reference output file exists,
365 # If we're not in --debug mode and reference output file exists,
365 # check test output against it.
366 # check test output against it.
@@ -1301,7 +1302,7 b' class TestRunner(object):'
1301 refpath = os.path.join(self.testdir, test + out)
1302 refpath = os.path.join(self.testdir, test + out)
1302 break
1303 break
1303
1304
1304 t = testcls(self, test, count, refpath)
1305 t = testcls(self, test, count, refpath, unittest=asunit)
1305
1306
1306 if not asunit:
1307 if not asunit:
1307 return t
1308 return t
General Comments 0
You need to be logged in to leave comments. Login now