~frankban/+junk/testrepository-encoding-error

« back to all changes in this revision

Viewing changes to testrepository/tests/test_results.py

  • Committer: Robert Collins
  • Date: 2011-05-01 23:48:50 UTC
  • Revision ID: robertc@robertcollins.net-20110501234850-u5sgfc4ejdlqlk6o
Refactor the support for counting tests observed vs shown.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
# license you chose for the specific language governing permissions and
13
13
# limitations under that license.
14
14
 
15
 
from testtools import TestCase, TestResult
 
15
from testtools import TestCase
16
16
 
17
17
from testrepository.results import TestResultFilter
 
18
from testrepository.ui import BaseUITestResult
 
19
from testrepository.ui.model import UI
18
20
 
19
21
 
20
22
class ResultFilter(TestCase):
21
23
 
22
24
    def test_addSuccess_increases_count(self):
23
 
        result = TestResult()
 
25
        result = BaseUITestResult(UI(), lambda:1)
24
26
        filtered = TestResultFilter(result)
25
27
        filtered.startTest(self)
26
28
        filtered.addSuccess(self)