Exceptions raised during renaming in rotating file handlers are now passed to handleE...
[python.git] / Lib / test / test_platform.py
blob200fba557238d5f186fdb925561c00c87d5f01cf
1 import unittest
2 from test import test_support
3 import platform
5 class PlatformTest(unittest.TestCase):
6 def test_architecture(self):
7 res = platform.architecture()
9 def test_machine(self):
10 res = platform.machine()
12 def test_node(self):
13 res = platform.node()
15 def test_platform(self):
16 for aliased in (False, True):
17 for terse in (False, True):
18 res = platform.platform(aliased, terse)
20 def test_processor(self):
21 res = platform.processor()
23 def test_python_build(self):
24 res = platform.python_build()
26 def test_python_compiler(self):
27 res = platform.python_compiler()
29 def test_version(self):
30 res1 = platform.version()
31 res2 = platform.version_tuple()
32 self.assertEqual(res1, ".".join(res2))
34 def test_release(self):
35 res = platform.release()
37 def test_system(self):
38 res = platform.system()
40 def test_version(self):
41 res = platform.version()
43 def test_system_alias(self):
44 res = platform.system_alias(
45 platform.system(),
46 platform.release(),
47 platform.version(),
50 def test_uname(self):
51 res = platform.uname()
53 def test_java_ver(self):
54 res = platform.java_ver()
56 def test_win32_ver(self):
57 res = platform.win32_ver()
59 def test_mac_ver(self):
60 res = platform.mac_ver()
62 def test_dist(self):
63 res = platform.dist()
65 def test_libc_ver(self):
66 res = platform.libc_ver()
68 def test_main():
69 test_support.run_unittest(
70 PlatformTest
73 if __name__ == '__main__':
74 test_main()