Line | |
---|
1 | #!/usr/bin/env python |
---|
2 | |
---|
3 | |
---|
4 | import unittest |
---|
5 | from Numeric import zeros, array, allclose |
---|
6 | |
---|
7 | from system_tools import * |
---|
8 | |
---|
9 | class Test_system_tools(unittest.TestCase): |
---|
10 | def setUp(self): |
---|
11 | pass |
---|
12 | |
---|
13 | def tearDown(self): |
---|
14 | pass |
---|
15 | |
---|
16 | def test_user_name(self): |
---|
17 | user = get_user_name() |
---|
18 | |
---|
19 | # print user |
---|
20 | assert isinstance(user, basestring), 'User name should be a string' |
---|
21 | |
---|
22 | def test_host_name(self): |
---|
23 | host = get_host_name() |
---|
24 | |
---|
25 | # print host |
---|
26 | assert isinstance(host, basestring), 'User name should be a string' |
---|
27 | |
---|
28 | |
---|
29 | #------------------------------------------------------------- |
---|
30 | if __name__ == "__main__": |
---|
31 | suite = unittest.makeSuite(Test_system_tools, 'test') |
---|
32 | runner = unittest.TextTestRunner() |
---|
33 | runner.run(suite) |
---|
34 | |
---|
35 | |
---|
36 | |
---|
37 | |
---|
Note: See
TracBrowser
for help on using the repository browser.