[stream-refactor] mark setns module as requiring Python >2.4

pull/607/head
David Wilson 5 years ago
parent 856dfcebcd
commit db9066fbfb

@ -383,6 +383,9 @@ Connection Methods
the root PID of a running Docker, LXC, LXD, or systemd-nspawn
container.
The setns method depends on the built-in :mod:`ctypes` module, and thus
does not support Python 2.4.
A program is required only to find the root PID, after which management
of the child Python interpreter is handled directly.

@ -1,6 +1,7 @@
import os
import socket
import sys
import mitogen
import mitogen.parent
@ -34,5 +35,12 @@ class DockerTest(testlib.DockerMixin, testlib.TestCase):
via_setns.call(socket.gethostname),
)
DockerTest = unittest2.skipIf(
condition=sys.version_info < (2, 5),
reason="mitogen.setns unsupported on Python <2.4"
)(DockerTest)
if __name__ == '__main__':
unittest2.main()

Loading…
Cancel
Save