Revision bdefe5dd test/ganeti.utils_unittest.py
b/test/ganeti.utils_unittest.py | ||
---|---|---|
1200 | 1200 |
|
1201 | 1201 |
self.assertEqual(exp, utils.RunInSeparateProcess(_child)) |
1202 | 1202 |
|
1203 |
def testArgs(self): |
|
1204 |
for arg in [0, 1, 999, "Hello World", (1, 2, 3)]: |
|
1205 |
def _child(carg1, carg2): |
|
1206 |
return carg1 == "Foo" and carg2 == arg |
|
1207 |
|
|
1208 |
self.assert_(utils.RunInSeparateProcess(_child, "Foo", arg)) |
|
1209 |
|
|
1203 | 1210 |
def testPid(self): |
1204 | 1211 |
parent_pid = os.getpid() |
1205 | 1212 |
|
Also available in: Unified diff