File: nested_test.py

package info (click to toggle)
python-mitogen 0.3.0~rc1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,240 kB
  • sloc: python: 19,899; sh: 91; perl: 19; ansic: 18; makefile: 13
file content (19 lines) | stat: -rw-r--r-- 386 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import os

import unittest2

import testlib


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)

        pid = context.call(os.getpid)
        self.assertIsInstance(pid, int)


if __name__ == '__main__':
    unittest2.main()