2 from test
import test_support
5 class PlatformTest(unittest
.TestCase
):
6 def test_architecture(self
):
7 res
= platform
.architecture()
9 def test_machine(self
):
10 res
= platform
.machine()
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(
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()
65 def test_libc_ver(self
):
66 res
= platform
.libc_ver()
69 test_support
.run_unittest(
73 if __name__
== '__main__':