def main():
    print "Test popen2 module:"
    try:
        from os import popen
    except ImportError:
        # if we don't have os.popen, check that
        # we have os.fork.  if not, skip the test
        # (by raising an ImportError)
        from os import fork
    import popen2
    popen2._test()
示例#2
0
def main():
    print "Test popen2 module:"
    if sys.platform[:4] == 'beos' and __name__ != '__main__':
        #  Locks get messed up or something.  Generally we're supposed
        #  to avoid mixing "posix" fork & exec with native threads, and
        #  they may be right about that after all.
        raise TestSkipped, "popen2() doesn't work during import on BeOS"
    try:
        from os import popen
    except ImportError:
        # if we don't have os.popen, check that
        # we have os.fork.  if not, skip the test
        # (by raising an ImportError)
        from os import fork
    import popen2
    popen2._test()
def main():
    print "Test popen2 module:"
    if sys.platform[:4] == 'beos' and __name__ != '__main__':
        #  Locks get messed up or something.  Generally we're supposed
        #  to avoid mixing "posix" fork & exec with native threads, and
        #  they may be right about that after all.
        raise TestSkipped, "popen2() doesn't work during import on BeOS"
    try:
        from os import popen
    except ImportError:
        # if we don't have os.popen, check that
        # we have os.fork.  if not, skip the test
        # (by raising an ImportError)
        from os import fork
    import popen2
    popen2._test()
示例#4
0
#! /usr/bin/env python
示例#5
0
def main():
    from os import fork # skips test through ImportError
    import popen2
    popen2._test()
示例#6
0
#! /usr/bin/env python
示例#7
0
def main():
    from os import fork  # skips test through ImportError
    import popen2
    popen2._test()