Because the module uses :program:`/bin/sh` command lines, a POSIX or compatible
shell for :func:`os.system` and :func:`os.popen` is required.
+.. availability:: Unix. Not available on VxWorks.
+
The :mod:`pipes` module defines the following class:
is_android = hasattr(sys, 'getandroidapilevel')
-if sys.platform != 'win32':
+if sys.platform not in ('win32', 'vxworks'):
unix_shell = '/system/bin/sh' if is_android else '/bin/sh'
else:
unix_shell = None
import string
import unittest
import shutil
-from test.support import run_unittest, reap_children
+from test.support import run_unittest, reap_children, unix_shell
from test.support.os_helper import TESTFN, unlink
if os.name != 'posix':
raise unittest.SkipTest('pipes module only works on posix')
+if not (unix_shell and os.path.exists(unix_shell)):
+ raise unittest.SkipTest('pipes module requires a shell')
+
TESTFN2 = TESTFN + "2"
# tr a-z A-Z is not portable, so make the ranges explicit