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

Side by Side Diff: Lib/test/test_descr.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/test/test_dbm.py ('k') | Lib/test/test_dis.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 builtins 1 import builtins
2 import sys 2 import sys
3 import types 3 import types
4 import math 4 import math
5 import unittest 5 import unittest
6 6
7 from copy import deepcopy 7 from copy import deepcopy
8 from test import support 8 from test import support
9 9
10 10
(...skipping 4229 matching lines...) Expand 10 before | Expand all | Expand 10 after
4240 self.assertTrue(isinstance(fake_str, str)) 4240 self.assertTrue(isinstance(fake_str, str))
4241 4241
4242 # call a method descriptor 4242 # call a method descriptor
4243 with self.assertRaises(TypeError): 4243 with self.assertRaises(TypeError):
4244 str.split(fake_str) 4244 str.split(fake_str)
4245 4245
4246 # call a slot wrapper descriptor 4246 # call a slot wrapper descriptor
4247 with self.assertRaises(TypeError): 4247 with self.assertRaises(TypeError):
4248 str.__add__(fake_str, "abc") 4248 str.__add__(fake_str, "abc")
4249 4249
4250 def test_repr_as_str(self):
4251 # Issue #11603: crash or infinite loop when rebinding __str__ as
4252 # __repr__.
4253 class Foo:
4254 pass
4255 Foo.__repr__ = Foo.__str__
4256 foo = Foo()
4257 str(foo)
4258 4250
4259 class DictProxyTests(unittest.TestCase): 4251 class DictProxyTests(unittest.TestCase):
4260 def setUp(self): 4252 def setUp(self):
4261 class C(object): 4253 class C(object):
4262 def meth(self): 4254 def meth(self):
4263 pass 4255 pass
4264 self.C = C 4256 self.C = C
4265 4257
4266 @unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(), 4258 @unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
4267 'trace function introduces __local__') 4259 'trace function introduces __local__')
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
4333 type.mro(tuple) 4325 type.mro(tuple)
4334 4326
4335 4327
4336 def test_main(): 4328 def test_main():
4337 # Run all local test cases, with PTypesLongInitTest first. 4329 # Run all local test cases, with PTypesLongInitTest first.
4338 support.run_unittest(PTypesLongInitTest, OperatorsTest, 4330 support.run_unittest(PTypesLongInitTest, OperatorsTest,
4339 ClassPropertiesAndMethods, DictProxyTests) 4331 ClassPropertiesAndMethods, DictProxyTests)
4340 4332
4341 if __name__ == "__main__": 4333 if __name__ == "__main__":
4342 test_main() 4334 test_main()
OLDNEW
« no previous file with comments | « Lib/test/test_dbm.py ('k') | Lib/test/test_dis.py » ('j') | no next file with comments »

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