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

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

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 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/unittest/case.py ('k') | Lib/urllib/request.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 difflib 1 import difflib
2 import pprint 2 import pprint
3 import pickle 3 import pickle
4 import re 4 import re
5 import sys 5 import sys
6 import warnings 6 import warnings
7 import weakref
8 import inspect 7 import inspect
9 8
10 from copy import deepcopy 9 from copy import deepcopy
11 from test import support 10 from test import support
12 11
13 import unittest 12 import unittest
14 13
15 from .support import ( 14 from .support import (
16 TestEquality, TestHashing, LoggingResult, 15 TestEquality, TestHashing, LoggingResult,
17 ResultWithNoStartTestRunStopTestRun 16 ResultWithNoStartTestRunStopTestRun
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 1297
1299 class Test4(unittest.TestCase): 1298 class Test4(unittest.TestCase):
1300 def test_something(self): 1299 def test_something(self):
1301 self.addCleanup(_raise) 1300 self.addCleanup(_raise)
1302 1301
1303 for klass in (Test1, Test2, Test3, Test4): 1302 for klass in (Test1, Test2, Test3, Test4):
1304 result = unittest.TestResult() 1303 result = unittest.TestResult()
1305 klass('test_something').run(result) 1304 klass('test_something').run(result)
1306 self.assertEqual(len(result.errors), 1) 1305 self.assertEqual(len(result.errors), 1)
1307 self.assertEqual(result.testsRun, 1) 1306 self.assertEqual(result.testsRun, 1)
1308
1309 @support.cpython_only
1310 def testNoCycles(self):
1311 case = unittest.TestCase()
1312 wr = weakref.ref(case)
1313 with support.disable_gc():
1314 del case
1315 self.assertFalse(wr())
OLDNEW
« no previous file with comments | « Lib/unittest/case.py ('k') | Lib/urllib/request.py » ('j') | no next file with comments »

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