Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Apr 2014 14:23:50 -0700] rev 21442
run-tests: record skips by raising SkipTest
The unittest way of recording a skipped test is to raise an exception
(at least with modern unittest implementation). We change Test to raise
a SkipTest when operating in unittest mode.
This does prevent some "tear down" activities from running in unittest
mode. This will be fixed in subsequent patches. Since unittest mode
is experimental, this should be OK.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Apr 2014 14:19:59 -0700] rev 21441
run-tests: implement TestCase.run()
Simply wrapping TestCase.run() is not sufficient for robust results
reporting because unittest in Python 2.4 does not know about things
like skipped tests and reports them as success or failures instead of
skips.
We will reimplement TestCase.run() with knowledge and semantics present
in modern Python releases.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Apr 2014 14:04:37 -0700] rev 21440
run-tests: don't print progress from Test when in unittest mode
unittest does its own printing of progress indicators as part of
TestResult. So, there is no need to print them when running in unittest
mode.
This will fix the double output of progress indicators that had been
occurring in unittest mode.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Apr 2014 13:04:19 -0700] rev 21439
run-tests: define a custom TestSuite that uses _executetests()
We now have a custom unittest.TestSuite implementation that uses
_executetests() and thus knows how to execute tests concurrently.
Running tests in --unittest mode will use this TestSuite.
Since the TestSuite handles concurrency, the warnings around --jobs and
--loop have been removed.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Apr 2014 13:00:40 -0700] rev 21438
run-tests: pass an optional TestResult into _executetests()
If the result is passed, we execute tests in the unittest way. A
subsequent patch will actually do this.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Apr 2014 12:49:43 -0700] rev 21437
run-tests: pass Test instances into TestRunner._executetests()
Test instances (not paths) are passed into _executetests(). This means
the logic for instantiating Test instances has been moved outside of
_executetests(). This was done because an upcoming patch will reuse the
logic in _executetests().
As part of this change, test counts are no longer managed by
_executetests().
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 17 May 2014 12:35:44 -0700] rev 21436
run-tests: define cleanup() on unittest class
We need a cleanup() on our unittest TestCase class to conform with the
execution API. This will eventually be replaced by tearDown().
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Apr 2014 12:45:44 -0700] rev 21435
run-tests: rename Test._test to Test.name
A lot of the attributes in Test could probably be renamed. This one is
needed for an upcoming patch.