~testing-cabal/ubuntu/natty/subunit/daily-build-packaging

« back to all changes in this revision

Viewing changes to python/subunit/tests/test_test_results.py

  • Committer: Jelmer Vernooij
  • Date: 2011-02-28 09:32:28 UTC
  • mfrom: (135.1.5 python3)
  • Revision ID: jelmer@samba.org-20110228093228-1hyelaw7zkfe91e1
Tags: 0.0.6+bzr140-0ubuntu1
Merge new upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
#  license at the users choice. A copy of both licenses are available in the
7
7
#  project source as Apache-2.0 and BSD. You may not use this file except in
8
8
#  compliance with one of these two licences.
9
 
#  
 
9
#
10
10
#  Unless required by applicable law or agreed to in writing, software
11
11
#  distributed under these licenses is distributed on an "AS IS" BASIS, WITHOUT
12
12
#  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
16
16
 
17
17
import datetime
18
18
import unittest
19
 
try:
20
 
    from StringIO import StringIO
21
 
except ImportError:
22
 
    from io import StringIO
23
 
import os
24
 
import sys
25
 
 
26
 
from testtools.content_type import ContentType
27
 
from testtools.content import Content
28
19
 
29
20
import subunit
30
21
import subunit.iso8601 as iso8601
85
76
 
86
77
    def test_startTest(self):
87
78
        self.result.startTest(self)
88
 
        
 
79
 
89
80
    def test_startTestRun(self):
90
81
        self.result.startTestRun()
91
 
        
 
82
 
92
83
    def test_stopTest(self):
93
84
        self.result.stopTest(self)
94
 
        
 
85
 
95
86
    def test_stopTestRun(self):
96
87
        self.result.stopTestRun()
97
88
 
98
89
    def test_addError(self):
99
90
        self.result.addError(self, subunit.RemoteError())
100
 
        
 
91
 
101
92
    def test_addError_details(self):
102
93
        self.result.addError(self, details={})
103
 
        
 
94
 
104
95
    def test_addFailure(self):
105
96
        self.result.addFailure(self, subunit.RemoteError())
106
97
 
145
136
 
146
137
    def test_time(self):
147
138
        self.result.time(None)
148
 
 
 
139
 
149
140
 
150
141
class TestAutoTimingTestResultDecorator(unittest.TestCase):
151
142