mitogen/tests/nested_test.py

20 lines
386 B
Python
Raw Normal View History

import os
import unittest2
2017-10-02 08:26:02 +00:00
import testlib
2017-10-02 08:26:02 +00:00
class NestedTest(testlib.RouterMixin, testlib.TestCase):
def test_nested(self):
context = None
for x in range(1, 11):
context = self.router.local(via=context, name='local%d' % x)
2017-10-02 08:26:02 +00:00
pid = context.call(os.getpid)
self.assertIsInstance(pid, int)
2017-10-02 08:26:02 +00:00
if __name__ == '__main__':
unittest2.main()