Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(153126)

Side by Side Diff: Lib/unittest/test/test_runner.py

Issue 23670: Modifications to support iOS as a development platform
Patch Set: Created 3 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Lib/test/test_zipfile.py ('k') | Lib/webbrowser.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import io 1 import io
2 import os 2 import os
3 import sys 3 import sys
4 import pickle 4 import pickle
5 import subprocess 5 import subprocess
6 6
7 import unittest 7 import unittest
8 from unittest.case import _Outcome 8 from unittest.case import _Outcome
9 9
10 from unittest.test.support import (LoggingResult, 10 from unittest.test.support import (LoggingResult,
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 STREAM = object() 267 STREAM = object()
268 DESCRIPTIONS = object() 268 DESCRIPTIONS = object()
269 VERBOSITY = object() 269 VERBOSITY = object()
270 runner = unittest.TextTestRunner(STREAM, DESCRIPTIONS, VERBOSITY, 270 runner = unittest.TextTestRunner(STREAM, DESCRIPTIONS, VERBOSITY,
271 resultclass=MockResultClass) 271 resultclass=MockResultClass)
272 self.assertEqual(runner.resultclass, MockResultClass) 272 self.assertEqual(runner.resultclass, MockResultClass)
273 273
274 expectedresult = (runner.stream, DESCRIPTIONS, VERBOSITY) 274 expectedresult = (runner.stream, DESCRIPTIONS, VERBOSITY)
275 self.assertEqual(runner._makeResult(), expectedresult) 275 self.assertEqual(runner._makeResult(), expectedresult)
276 276
277 @unittest.skipUnless(hasattr(subprocess, 'Popen'), "test requires subprocess .Popen()")
277 def test_warnings(self): 278 def test_warnings(self):
278 """ 279 """
279 Check that warnings argument of TextTestRunner correctly affects the 280 Check that warnings argument of TextTestRunner correctly affects the
280 behavior of the warnings. 281 behavior of the warnings.
281 """ 282 """
282 # see #10535 and the _test_warnings file for more information 283 # see #10535 and the _test_warnings file for more information
283 284
284 def get_parse_out_err(p): 285 def get_parse_out_err(p):
285 return [b.splitlines() for b in p.communicate()] 286 return [b.splitlines() for b in p.communicate()]
286 opts = dict(stdout=subprocess.PIPE, stderr=subprocess.PIPE, 287 opts = dict(stdout=subprocess.PIPE, stderr=subprocess.PIPE,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 342
342 def testSpecifiedStreamUsed(self): 343 def testSpecifiedStreamUsed(self):
343 # see issue 10786 344 # see issue 10786
344 f = io.StringIO() 345 f = io.StringIO()
345 runner = unittest.TextTestRunner(f) 346 runner = unittest.TextTestRunner(f)
346 self.assertTrue(runner.stream.stream is f) 347 self.assertTrue(runner.stream.stream is f)
347 348
348 349
349 if __name__ == "__main__": 350 if __name__ == "__main__":
350 unittest.main() 351 unittest.main()
OLDNEW
« no previous file with comments | « Lib/test/test_zipfile.py ('k') | Lib/webbrowser.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+