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

Side by Side Diff: Lib/test/test_platform.py

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 10 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_pkgimport.py ('k') | Lib/test/test_posix.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 os 1 import os
2 import platform 2 import platform
3 import subprocess 3 import subprocess
4 import sys 4 import sys
5 import unittest 5 import unittest
6 import warnings 6 import warnings
7 7
8 from test import support 8 from test import support
9 9
10 class PlatformTest(unittest.TestCase): 10 class PlatformTest(unittest.TestCase):
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 if len_diff > 0: 184 if len_diff > 0:
185 expect_list.extend(['0'] * len_diff) 185 expect_list.extend(['0'] * len_diff)
186 self.assertEqual(result_list, expect_list) 186 self.assertEqual(result_list, expect_list)
187 187
188 # res[1] claims to contain 188 # res[1] claims to contain
189 # (version, dev_stage, non_release_version) 189 # (version, dev_stage, non_release_version)
190 # That information is no longer available 190 # That information is no longer available
191 self.assertEqual(res[1], ('', '', '')) 191 self.assertEqual(res[1], ('', '', ''))
192 192
193 if sys.byteorder == 'little': 193 if sys.byteorder == 'little':
194 self.assertIn(res[2], ('i386', 'x86_64')) 194 self.assertEqual(res[2], 'i386')
195 else: 195 else:
196 self.assertEqual(res[2], 'PowerPC') 196 self.assertEqual(res[2], 'PowerPC')
197 197
198 198
199 @unittest.skipUnless(sys.platform == 'darwin', "OSX only test") 199 @unittest.skipUnless(sys.platform == 'darwin', "OSX only test")
200 def test_mac_ver_with_fork(self): 200 def test_mac_ver_with_fork(self):
201 # Issue7895: platform.mac_ver() crashes when using fork without exec 201 # Issue7895: platform.mac_ver() crashes when using fork without exec
202 # 202 #
203 # This test checks that the fix for that issue works. 203 # This test checks that the fix for that issue works.
204 # 204 #
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 self.assertEqual(returncode, len(data)) 277 self.assertEqual(returncode, len(data))
278 278
279 279
280 def test_main(): 280 def test_main():
281 support.run_unittest( 281 support.run_unittest(
282 PlatformTest 282 PlatformTest
283 ) 283 )
284 284
285 if __name__ == '__main__': 285 if __name__ == '__main__':
286 test_main() 286 test_main()
OLDNEW
« no previous file with comments | « Lib/test/test_pkgimport.py ('k') | Lib/test/test_posix.py » ('j') | no next file with comments »

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