✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ beluga.o2switch.net ​🇻​♯➤ 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 185.154.139.77 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.84
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/alt/python38/lib64/python3.8/test//test_posix.py
"Test posix functions"

from test import support
from test.support.script_helper import assert_python_ok

# Skip these tests if there is no posix module.
posix = support.import_module('posix')

import errno
import sys
import signal
import time
import os
import platform
import pwd
import stat
import tempfile
import unittest
import warnings
import textwrap

_DUMMY_SYMLINK = os.path.join(tempfile.gettempdir(),
                              support.TESTFN + '-dummy-symlink')

requires_32b = unittest.skipUnless(sys.maxsize < 2**32,
        'test is only meaningful on 32-bit builds')

def _supports_sched():
    if not hasattr(posix, 'sched_getscheduler'):
        return False
    try:
        posix.sched_getscheduler(0)
    except OSError as e:
        if e.errno == errno.ENOSYS:
            return False
    return True

requires_sched = unittest.skipUnless(_supports_sched(), 'requires POSIX scheduler API')

class PosixTester(unittest.TestCase):

    def setUp(self):
        # create empty file
        fp = open(support.TESTFN, 'w+')
        fp.close()
        self.teardown_files = [ support.TESTFN ]
        self._warnings_manager = support.check_warnings()
        self._warnings_manager.__enter__()
        warnings.filterwarnings('ignore', '.* potential security risk .*',
                                RuntimeWarning)

    def tearDown(self):
        for teardown_file in self.teardown_files:
            support.unlink(teardown_file)
        self._warnings_manager.__exit__(None, None, None)

    def testNoArgFunctions(self):
        # test posix functions which take no arguments and have
        # no side-effects which we need to cleanup (e.g., fork, wait, abort)
        NO_ARG_FUNCTIONS = [ "ctermid", "getcwd", "getcwdb", "uname",
                             "times", "getloadavg",
                             "getegid", "geteuid", "getgid", "getgroups",
                             "getpid", "getpgrp", "getppid", "getuid", "sync",
                           ]

        for name in NO_ARG_FUNCTIONS:
            posix_func = getattr(posix, name, None)
            if posix_func is not None:
                posix_func()
                self.assertRaises(TypeError, posix_func, 1)

    @unittest.skipUnless(hasattr(posix, 'getresuid'),
                         'test needs posix.getresuid()')
    def test_getresuid(self):
        user_ids = posix.getresuid()
        self.assertEqual(len(user_ids), 3)
        for val in user_ids:
            self.assertGreaterEqual(val, 0)

    @unittest.skipUnless(hasattr(posix, 'getresgid'),
                         'test needs posix.getresgid()')
    def test_getresgid(self):
        group_ids = posix.getresgid()
        self.assertEqual(len(group_ids), 3)
        for val in group_ids:
            self.assertGreaterEqual(val, 0)

    @unittest.skipUnless(hasattr(posix, 'setresuid'),
                         'test needs posix.setresuid()')
    def test_setresuid(self):
        current_user_ids = posix.getresuid()
        self.assertIsNone(posix.setresuid(*current_user_ids))
        # -1 means don't change that value.
        self.assertIsNone(posix.setresuid(-1, -1, -1))

    @unittest.skipUnless(hasattr(posix, 'setresuid'),
                         'test needs posix.setresuid()')
    def test_setresuid_exception(self):
        # Don't do this test if someone is silly enough to run us as root.
        current_user_ids = posix.getresuid()
        if 0 not in current_user_ids:
            new_user_ids = (current_user_ids[0]+1, -1, -1)
            self.assertRaises(OSError, posix.setresuid, *new_user_ids)

    @unittest.skipUnless(hasattr(posix, 'setresgid'),
                         'test needs posix.setresgid()')
    def test_setresgid(self):
        current_group_ids = posix.getresgid()
        self.assertIsNone(posix.setresgid(*current_group_ids))
        # -1 means don't change that value.
        self.assertIsNone(posix.setresgid(-1, -1, -1))

    @unittest.skipUnless(hasattr(posix, 'setresgid'),
                         'test needs posix.setresgid()')
    def test_setresgid_exception(self):
        # Don't do this test if someone is silly enough to run us as root.
        current_group_ids = posix.getresgid()
        if 0 not in current_group_ids:
            new_group_ids = (current_group_ids[0]+1, -1, -1)
            self.assertRaises(OSError, posix.setresgid, *new_group_ids)

    @unittest.skipUnless(hasattr(posix, 'initgroups'),
                         "test needs os.initgroups()")
    def test_initgroups(self):
        # It takes a string and an integer; check that it raises a TypeError
        # for other argument lists.
        self.assertRaises(TypeError, posix.initgroups)
        self.assertRaises(TypeError, posix.initgroups, None)
        self.assertRaises(TypeError, posix.initgroups, 3, "foo")
        self.assertRaises(TypeError, posix.initgroups, "foo", 3, object())

        # If a non-privileged user invokes it, it should fail with OSError
        # EPERM.
        if os.getuid() != 0:
            try:
                name = pwd.getpwuid(posix.getuid()).pw_name
            except KeyError:
                # the current UID may not have a pwd entry
                raise unittest.SkipTest("need a pwd entry")
            try:
                posix.initgroups(name, 13)
            except OSError as e:
                self.assertEqual(e.errno, errno.EPERM)
            else:
                self.fail("Expected OSError to be raised by initgroups")

    @unittest.skipUnless(hasattr(posix, 'statvfs'),
                         'test needs posix.statvfs()')
    def test_statvfs(self):
        self.assertTrue(posix.statvfs(os.curdir))

    @unittest.skipUnless(hasattr(posix, 'fstatvfs'),
                         'test needs posix.fstatvfs()')
    def test_fstatvfs(self):
        fp = open(support.TESTFN)
        try:
            self.assertTrue(posix.fstatvfs(fp.fileno()))
            self.assertTrue(posix.statvfs(fp.fileno()))
        finally:
            fp.close()

    @unittest.skipUnless(hasattr(posix, 'ftruncate'),
                         'test needs posix.ftruncate()')
    def test_ftruncate(self):
        fp = open(support.TESTFN, 'w+')
        try:
            # we need to have some data to truncate
            fp.write('test')
            fp.flush()
            posix.ftruncate(fp.fileno(), 0)
        finally:
            fp.close()

    @unittest.skipUnless(hasattr(posix, 'truncate'), "test needs posix.truncate()")
    def test_truncate(self):
        with open(support.TESTFN, 'w') as fp:
            fp.write('test')
            fp.flush()
        posix.truncate(support.TESTFN, 0)

    @unittest.skipUnless(getattr(os, 'execve', None) in os.supports_fd, "test needs execve() to support the fd parameter")
    @unittest.skipUnless(hasattr(os, 'fork'), "test needs os.fork()")
    @unittest.skipUnless(hasattr(os, 'waitpid'), "test needs os.waitpid()")
    def test_fexecve(self):
        fp = os.open(sys.executable, os.O_RDONLY)
        try:
            pid = os.fork()
            if pid == 0:
                os.chdir(os.path.split(sys.executable)[0])
                posix.execve(fp, [sys.executable, '-c', 'pass'], os.environ)
            else:
                self.assertEqual(os.waitpid(pid, 0), (pid, 0))
        finally:
            os.close(fp)


    @unittest.skipUnless(hasattr(posix, 'waitid'), "test needs posix.waitid()")
    @unittest.skipUnless(hasattr(os, 'fork'), "test needs os.fork()")
    def test_waitid(self):
        pid = os.fork()
        if pid == 0:
            os.chdir(os.path.split(sys.executable)[0])
            posix.execve(sys.executable, [sys.executable, '-c', 'pass'], os.environ)
        else:
            res = posix.waitid(posix.P_PID, pid, posix.WEXITED)
            self.assertEqual(pid, res.si_pid)

    @unittest.skipUnless(hasattr(os, 'fork'), "test needs os.fork()")
    def test_register_at_fork(self):
        with self.assertRaises(TypeError, msg="Positional args not allowed"):
            os.register_at_fork(lambda: None)
        with self.assertRaises(TypeError, msg="Args must be callable"):
            os.register_at_fork(before=2)
        with self.assertRaises(TypeError, msg="Args must be callable"):
            os.register_at_fork(after_in_child="three")
        with self.assertRaises(TypeError, msg="Args must be callable"):
            os.register_at_fork(after_in_parent=b"Five")
        with self.assertRaises(TypeError, msg="Args must not be None"):
            os.register_at_fork(before=None)
        with self.assertRaises(TypeError, msg="Args must not be None"):
            os.register_at_fork(after_in_child=None)
        with self.assertRaises(TypeError, msg="Args must not be None"):
            os.register_at_fork(after_in_parent=None)
        with self.assertRaises(TypeError, msg="Invalid arg was allowed"):
            # Ensure a combination of valid and invalid is an error.
            os.register_at_fork(before=None, after_in_parent=lambda: 3)
        with self.assertRaises(TypeError, msg="Invalid arg was allowed"):
            # Ensure a combination of valid and invalid is an error.
            os.register_at_fork(before=lambda: None, after_in_child='')
        # We test actual registrations in their own process so as not to
        # pollute this one.  There is no way to unregister for cleanup.
        code = """if 1:
            import os

            r, w = os.pipe()
            fin_r, fin_w = os.pipe()

            os.register_at_fork(before=lambda: os.write(w, b'A'))
            os.register_at_fork(after_in_parent=lambda: os.write(w, b'C'))
            os.register_at_fork(after_in_child=lambda: os.write(w, b'E'))
            os.register_at_fork(before=lambda: os.write(w, b'B'),
                                after_in_parent=lambda: os.write(w, b'D'),
                                after_in_child=lambda: os.write(w, b'F'))

            pid = os.fork()
            if pid == 0:
                # At this point, after-forkers have already been executed
                os.close(w)
                # Wait for parent to tell us to exit
                os.read(fin_r, 1)
                os._exit(0)
            else:
                try:
                    os.close(w)
                    with open(r, "rb") as f:
                        data = f.read()
                        assert len(data) == 6, data
                        # Check before-fork callbacks
                        assert data[:2] == b'BA', data
                        # Check after-fork callbacks
                        assert sorted(data[2:]) == list(b'CDEF'), data
                        assert data.index(b'C') < data.index(b'D'), data
                        assert data.index(b'E') < data.index(b'F'), data
                finally:
                    os.write(fin_w, b'!')
            """
        assert_python_ok('-c', code)

    @unittest.skipUnless(hasattr(posix, 'lockf'), "test needs posix.lockf()")
    def test_lockf(self):
        fd = os.open(support.TESTFN, os.O_WRONLY | os.O_CREAT)
        try:
            os.write(fd, b'test')
            os.lseek(fd, 0, os.SEEK_SET)
            posix.lockf(fd, posix.F_LOCK, 4)
            # section is locked
            posix.lockf(fd, posix.F_ULOCK, 4)
        finally:
            os.close(fd)

    @unittest.skipUnless(hasattr(posix, 'pread'), "test needs posix.pread()")
    def test_pread(self):
        fd = os.open(support.TESTFN, os.O_RDWR | os.O_CREAT)
        try:
            os.write(fd, b'test')
            os.lseek(fd, 0, os.SEEK_SET)
            self.assertEqual(b'es', posix.pread(fd, 2, 1))
            # the first pread() shouldn't disturb the file offset
            self.assertEqual(b'te', posix.read(fd, 2))
        finally:
            os.close(fd)

    @unittest.skipUnless(hasattr(posix, 'preadv'), "test needs posix.preadv()")
    def test_preadv(self):
        fd = os.open(support.TESTFN, os.O_RDWR | os.O_CREAT)
        try:
            os.write(fd, b'test1tt2t3t5t6t6t8')
            buf = [bytearray(i) for i in [5, 3, 2]]
            self.assertEqual(posix.preadv(fd, buf, 3), 10)
            self.assertEqual([b't1tt2', b't3t', b'5t'], list(buf))
        finally:
            os.close(fd)

    @unittest.skipUnless(hasattr(posix, 'preadv'), "test needs posix.preadv()")
    @unittest.skipUnless(hasattr(posix, 'RWF_HIPRI'), "test needs posix.RWF_HIPRI")
    def test_preadv_flags(self):
        fd = os.open(support.TESTFN, os.O_RDWR | os.O_CREAT)
        try:
            os.write(fd, b'test1tt2t3t5t6t6t8')
            buf = [bytearray(i) for i in [5, 3, 2]]
            self.assertEqual(posix.preadv(fd, buf, 3, os.RWF_HIPRI), 10)
            self.assertEqual([b't1tt2', b't3t', b'5t'], list(buf))
        except NotImplementedError:
            self.skipTest("preadv2 not available")
        except OSError as inst:
            # Is possible that the macro RWF_HIPRI was defined at compilation time
            # but the option is not supported by the kernel or the runtime libc shared
            # library.
            if inst.errno in {errno.EINVAL, errno.ENOTSUP}:
                raise unittest.SkipTest("RWF_HIPRI is not supported by the current system")
            else:
                raise
        finally:
            os.close(fd)

    @unittest.skipUnless(hasattr(posix, 'preadv'), "test needs posix.preadv()")
    @requires_32b
    def test_preadv_overflow_32bits(self):
        fd = os.open(support.TESTFN, os.O_RDWR | os.O_CREAT)
        try:
            buf = [bytearray(2**16)] * 2**15
            with self.assertRaises(OSError) as cm:
                os.preadv(fd, buf, 0)
            self.assertEqual(cm.exception.errno, errno.EINVAL)
            self.assertEqual(bytes(buf[0]), b'\0'* 2**16)
        finally:
            os.close(fd)

    @unittest.skipUnless(hasattr(posix, 'pwrite'), "test needs posix.pwrite()")
    def test_pwrite(self):
        fd = os.open(support.TESTFN, os.O_RDWR | os.O_CREAT)
        try:
            os.write(fd, b'test')
            os.lseek(fd, 0, os.SEEK_SET)
            posix.pwrite(fd, b'xx', 1)
            self.assertEqual(b'txxt', posix.read(fd, 4))
        finally:
            os.close(fd)

    @unittest.skipUnless(hasattr(posix, 'pwritev'), "test needs posix.pwritev()")
    def test_pwritev(self):
        fd = os.open(support.TESTFN, os.O_RDWR | os.O_CREAT)
        try:
            os.write(fd, b"xx")
            os.lseek(fd, 0, os.SEEK_SET)
            n = os.pwritev(fd, [b'test1', b'tt2', b't3'], 2)
            self.assertEqual(n, 10)

            os.lseek(fd, 0, os.SEEK_SET)
            self.assertEqual(b'xxtest1tt2t3', posix.read(fd, 100))
        finally:
            os.close(fd)

    @unittest.skipUnless(hasattr(posix, 'pwritev'), "test needs posix.pwritev()")
    @unittest.skipUnless(hasattr(posix, 'os.RWF_SYNC'), "test needs os.RWF_SYNC")
    def test_pwritev_flags(self):
        fd = os.open(support.TESTFN, os.O_RDWR | os.O_CREAT)
        try:
            os.write(fd,b"xx")
            os.lseek(fd, 0, os.SEEK_SET)
            n = os.pwritev(fd, [b'test1', b'tt2', b't3'], 2, os.RWF_SYNC)
            self.assertEqual(n, 10)

            os.lseek(fd, 0, os.SEEK_SET)
            self.assertEqual(b'xxtest1tt2', posix.read(fd, 100))
        finally:
            os.close(fd)

    @unittest.skipUnless(hasattr(posix, 'pwritev'), "test needs posix.pwritev()")
    @requires_32b
    def test_pwritev_overflow_32bits(self):
        fd = os.open(support.TESTFN, os.O_RDWR | os.O_CREAT)
        try:
            with self.assertRaises(OSError) as cm:
                os.pwritev(fd, [b"x" * 2**16] * 2**15, 0)
            self.assertEqual(cm.exception.errno, errno.EINVAL)
        finally:
            os.close(fd)

    @unittest.skipUnless(hasattr(posix, 'posix_fallocate'),
        "test needs posix.posix_fallocate()")
    def test_posix_fallocate(self):
        fd = os.open(support.TESTFN, os.O_WRONLY | os.O_CREAT)
        try:
            posix.posix_fallocate(fd, 0, 10)
        except OSError as inst:
            # issue10812, ZFS doesn't appear to support posix_fallocate,
            # so skip Solaris-based since they are likely to have ZFS.
            # issue33655: Also ignore EINVAL on *BSD since ZFS is also
            # often used there.
            if inst.errno == errno.EINVAL and sys.platform.startswith(
                ('sunos', 'freebsd', 'netbsd', 'openbsd', 'gnukfreebsd')):
                raise unittest.SkipTest("test may fail on ZFS filesystems")
            else:
                raise
        finally:
            os.close(fd)

    # issue31106 - posix_fallocate() does not set error in errno.
    @unittest.skipUnless(hasattr(posix, 'posix_fallocate'),
        "test needs posix.posix_fallocate()")
    def test_posix_fallocate_errno(self):
        try:
            posix.posix_fallocate(-42, 0, 10)
        except OSError as inst:
            if inst.errno != errno.EBADF:
                raise

    @unittest.skipUnless(hasattr(posix, 'posix_fadvise'),
        "test needs posix.posix_fadvise()")
    def test_posix_fadvise(self):
        fd = os.open(support.TESTFN, os.O_RDONLY)
        try:
            posix.posix_fadvise(fd, 0, 0, posix.POSIX_FADV_WILLNEED)
        finally:
            os.close(fd)

    @unittest.skipUnless(hasattr(posix, 'posix_fadvise'),
        "test needs posix.posix_fadvise()")
    def test_posix_fadvise_errno(self):
        try:
            posix.posix_fadvise(-42, 0, 0, posix.POSIX_FADV_WILLNEED)
        except OSError as inst:
            if inst.errno != errno.EBADF:
                raise

    @unittest.skipUnless(os.utime in os.supports_fd, "test needs fd support in os.utime")
    def test_utime_with_fd(self):
        now = time.time()
        fd = os.open(support.TESTFN, os.O_RDONLY)
        try:
            posix.utime(fd)
            posix.utime(fd, None)
            self.assertRaises(TypeError, posix.utime, fd, (None, None))
            self.assertRaises(TypeError, posix.utime, fd, (now, None))
            self.assertRaises(TypeError, posix.utime, fd, (None, now))
            posix.utime(fd, (int(now), int(now)))
            posix.utime(fd, (now, now))
            self.assertRaises(ValueError, posix.utime, fd, (now, now), ns=(now, now))
            self.assertRaises(ValueError, posix.utime, fd, (now, 0), ns=(None, None))
            self.assertRaises(ValueError, posix.utime, fd, (None, None), ns=(now, 0))
            posix.utime(fd, (int(now), int((now - int(now)) * 1e9)))
            posix.utime(fd, ns=(int(now), int((now - int(now)) * 1e9)))

        finally:
            os.close(fd)

    @unittest.skipUnless(os.utime in os.supports_follow_symlinks, "test needs follow_symlinks support in os.utime")
    def test_utime_nofollow_symlinks(self):
        now = time.time()
        posix.utime(support.TESTFN, None, follow_symlinks=False)
        self.assertRaises(TypeError, posix.utime, support.TESTFN, (None, None), follow_symlinks=False)
        self.assertRaises(TypeError, posix.utime, support.TESTFN, (now, None), follow_symlinks=False)
        self.assertRaises(TypeError, posix.utime, support.TESTFN, (None, now), follow_symlinks=False)
        posix.utime(support.TESTFN, (int(now), int(now)), follow_symlinks=False)
        posix.utime(support.TESTFN, (now, now), follow_symlinks=False)
        posix.utime(support.TESTFN, follow_symlinks=False)

    @unittest.skipUnless(hasattr(posix, 'writev'), "test needs posix.writev()")
    def test_writev(self):
        fd = os.open(support.TESTFN, os.O_RDWR | os.O_CREAT)
        try:
            n = os.writev(fd, (b'test1', b'tt2', b't3'))
            self.assertEqual(n, 10)

            os.lseek(fd, 0, os.SEEK_SET)
            self.assertEqual(b'test1tt2t3', posix.read(fd, 10))

            # Issue #20113: empty list of buffers should not crash
            try:
                size = posix.writev(fd, [])
            except OSError:
                # writev(fd, []) raises OSError(22, "Invalid argument")
                # on OpenIndiana
                pass
            else:
                self.assertEqual(size, 0)
        finally:
            os.close(fd)

    @unittest.skipUnless(hasattr(posix, 'writev'), "test needs posix.writev()")
    @requires_32b
    def test_writev_overflow_32bits(self):
        fd = os.open(support.TESTFN, os.O_RDWR | os.O_CREAT)
        try:
            with self.assertRaises(OSError) as cm:
                os.writev(fd, [b"x" * 2**16] * 2**15)
            self.assertEqual(cm.exception.errno, errno.EINVAL)
        finally:
            os.close(fd)

    @unittest.skipUnless(hasattr(posix, 'readv'), "test needs posix.readv()")
    def test_readv(self):
        fd = os.open(support.TESTFN, os.O_RDWR | os.O_CREAT)
        try:
            os.write(fd, b'test1tt2t3')
            os.lseek(fd, 0, os.SEEK_SET)
            buf = [bytearray(i) for i in [5, 3, 2]]
            self.assertEqual(posix.readv(fd, buf), 10)
            self.assertEqual([b'test1', b'tt2', b't3'], [bytes(i) for i in buf])

            # Issue #20113: empty list of buffers should not crash
            try:
                size = posix.readv(fd, [])
            except OSError:
                # readv(fd, []) raises OSError(22, "Invalid argument")
                # on OpenIndiana
                pass
            else:
                self.assertEqual(size, 0)
        finally:
            os.close(fd)

    @unittest.skipUnless(hasattr(posix, 'readv'), "test needs posix.readv()")
    @requires_32b
    def test_readv_overflow_32bits(self):
        fd = os.open(support.TESTFN, os.O_RDWR | os.O_CREAT)
        try:
            buf = [bytearray(2**16)] * 2**15
            with self.assertRaises(OSError) as cm:
                os.readv(fd, buf)
            self.assertEqual(cm.exception.errno, errno.EINVAL)
            self.assertEqual(bytes(buf[0]), b'\0'* 2**16)
        finally:
            os.close(fd)

    @unittest.skipUnless(hasattr(posix, 'dup'),
                         'test needs posix.dup()')
    def test_dup(self):
        fp = open(support.TESTFN)
        try:
            fd = posix.dup(fp.fileno())
            self.assertIsInstance(fd, int)
            os.close(fd)
        finally:
            fp.close()

    @unittest.skipUnless(hasattr(posix, 'confstr'),
                         'test needs posix.confstr()')
    def test_confstr(self):
        self.assertRaises(ValueError, posix.confstr, "CS_garbage")
        self.assertEqual(len(posix.confstr("CS_PATH")) > 0, True)

    @unittest.skipUnless(hasattr(posix, 'dup2'),
                         'test needs posix.dup2()')
    def test_dup2(self):
        fp1 = open(support.TESTFN)
        fp2 = open(support.TESTFN)
        try:
            posix.dup2(fp1.fileno(), fp2.fileno())
        finally:
            fp1.close()
            fp2.close()

    @unittest.skipUnless(hasattr(os, 'O_CLOEXEC'), "needs os.O_CLOEXEC")
    @support.requires_linux_version(2, 6, 23)
    def test_oscloexec(self):
        fd = os.open(support.TESTFN, os.O_RDONLY|os.O_CLOEXEC)
        self.addCleanup(os.close, fd)
        self.assertFalse(os.get_inheritable(fd))

    @unittest.skipUnless(hasattr(posix, 'O_EXLOCK'),
                         'test needs posix.O_EXLOCK')
    def test_osexlock(self):
        fd = os.open(support.TESTFN,
                     os.O_WRONLY|os.O_EXLOCK|os.O_CREAT)
        self.assertRaises(OSError, os.open, support.TESTFN,
                          os.O_WRONLY|os.O_EXLOCK|os.O_NONBLOCK)
        os.close(fd)

        if hasattr(posix, "O_SHLOCK"):
            fd = os.open(support.TESTFN,
                         os.O_WRONLY|os.O_SHLOCK|os.O_CREAT)
            self.assertRaises(OSError, os.open, support.TESTFN,
                              os.O_WRONLY|os.O_EXLOCK|os.O_NONBLOCK)
            os.close(fd)

    @unittest.skipUnless(hasattr(posix, 'O_SHLOCK'),
                         'test needs posix.O_SHLOCK')
    def test_osshlock(self):
        fd1 = os.open(support.TESTFN,
                     os.O_WRONLY|os.O_SHLOCK|os.O_CREAT)
        fd2 = os.open(support.TESTFN,
                      os.O_WRONLY|os.O_SHLOCK|os.O_CREAT)
        os.close(fd2)
        os.close(fd1)

        if hasattr(posix, "O_EXLOCK"):
            fd = os.open(support.TESTFN,
                         os.O_WRONLY|os.O_SHLOCK|os.O_CREAT)
            self.assertRaises(OSError, os.open, support.TESTFN,
                              os.O_RDONLY|os.O_EXLOCK|os.O_NONBLOCK)
            os.close(fd)

    @unittest.skipUnless(hasattr(posix, 'fstat'),
                         'test needs posix.fstat()')
    def test_fstat(self):
        fp = open(support.TESTFN)
        try:
            self.assertTrue(posix.fstat(fp.fileno()))
            self.assertTrue(posix.stat(fp.fileno()))

            self.assertRaisesRegex(TypeError,
                    'should be string, bytes, os.PathLike or integer, not',
                    posix.stat, float(fp.fileno()))
        finally:
            fp.close()

    def test_stat(self):
        self.assertTrue(posix.stat(support.TESTFN))
        self.assertTrue(posix.stat(os.fsencode(support.TESTFN)))

        self.assertWarnsRegex(DeprecationWarning,
                'should be string, bytes, os.PathLike or integer, not',
                posix.stat, bytearray(os.fsencode(support.TESTFN)))
        self.assertRaisesRegex(TypeError,
                'should be string, bytes, os.PathLike or integer, not',
                posix.stat, None)
        self.assertRaisesRegex(TypeError,
                'should be string, bytes, os.PathLike or integer, not',
                posix.stat, list(support.TESTFN))
        self.assertRaisesRegex(TypeError,
                'should be string, bytes, os.PathLike or integer, not',
                posix.stat, list(os.fsencode(support.TESTFN)))

    @unittest.skipUnless(hasattr(posix, 'mkfifo'), "don't have mkfifo()")
    def test_mkfifo(self):
        support.unlink(support.TESTFN)
        try:
            posix.mkfifo(support.TESTFN, stat.S_IRUSR | stat.S_IWUSR)
        except PermissionError as e:
            self.skipTest('posix.mkfifo(): %s' % e)
        self.assertTrue(stat.S_ISFIFO(posix.stat(support.TESTFN).st_mode))

    @unittest.skipUnless(hasattr(posix, 'mknod') and hasattr(stat, 'S_IFIFO'),
                         "don't have mknod()/S_IFIFO")
    def test_mknod(self):
        # Test using mknod() to create a FIFO (the only use specified
        # by POSIX).
        support.unlink(support.TESTFN)
        mode = stat.S_IFIFO | stat.S_IRUSR | stat.S_IWUSR
        try:
            posix.mknod(support.TESTFN, mode, 0)
        except OSError as e:
            # Some old systems don't allow unprivileged users to use
            # mknod(), or only support creating device nodes.
            self.assertIn(e.errno, (errno.EPERM, errno.EINVAL, errno.EACCES))
        else:
            self.assertTrue(stat.S_ISFIFO(posix.stat(support.TESTFN).st_mode))

        # Keyword arguments are also supported
        support.unlink(support.TESTFN)
        try:
            posix.mknod(path=support.TESTFN, mode=mode, device=0,
                dir_fd=None)
        except OSError as e:
            self.assertIn(e.errno, (errno.EPERM, errno.EINVAL, errno.EACCES))

    @unittest.skipUnless(hasattr(posix, 'makedev'), 'test needs posix.makedev()')
    def test_makedev(self):
        st = posix.stat(support.TESTFN)
        dev = st.st_dev
        self.assertIsInstance(dev, int)
        self.assertGreaterEqual(dev, 0)

        major = posix.major(dev)
        self.assertIsInstance(major, int)
        self.assertGreaterEqual(major, 0)
        self.assertEqual(posix.major(dev), major)
        self.assertRaises(TypeError, posix.major, float(dev))
        self.assertRaises(TypeError, posix.major)
        self.assertRaises((ValueError, OverflowError), posix.major, -1)

        minor = posix.minor(dev)
        self.assertIsInstance(minor, int)
        self.assertGreaterEqual(minor, 0)
        self.assertEqual(posix.minor(dev), minor)
        self.assertRaises(TypeError, posix.minor, float(dev))
        self.assertRaises(TypeError, posix.minor)
        self.assertRaises((ValueError, OverflowError), posix.minor, -1)

        self.assertEqual(posix.makedev(major, minor), dev)
        self.assertRaises(TypeError, posix.makedev, float(major), minor)
        self.assertRaises(TypeError, posix.makedev, major, float(minor))
        self.assertRaises(TypeError, posix.makedev, major)
        self.assertRaises(TypeError, posix.makedev)

    def _test_all_chown_common(self, chown_func, first_param, stat_func):
        """Common code for chown, fchown and lchown tests."""
        def check_stat(uid, gid):
            if stat_func is not None:
                stat = stat_func(first_param)
                self.assertEqual(stat.st_uid, uid)
                self.assertEqual(stat.st_gid, gid)
        uid = os.getuid()
        gid = os.getgid()
        # test a successful chown call
        chown_func(first_param, uid, gid)
        check_stat(uid, gid)
        chown_func(first_param, -1, gid)
        check_stat(uid, gid)
        chown_func(first_param, uid, -1)
        check_stat(uid, gid)

        if uid == 0:
            # Try an amusingly large uid/gid to make sure we handle
            # large unsigned values.  (chown lets you use any
            # uid/gid you like, even if they aren't defined.)
            #
            # This problem keeps coming up:
            #   http://bugs.python.org/issue1747858
            #   http://bugs.python.org/issue4591
            #   http://bugs.python.org/issue15301
            # Hopefully the fix in 4591 fixes it for good!
            #
            # This part of the test only runs when run as root.
            # Only scary people run their tests as root.

            big_value = 2**31
            chown_func(first_param, big_value, big_value)
            check_stat(big_value, big_value)
            chown_func(first_param, -1, -1)
            check_stat(big_value, big_value)
            chown_func(first_param, uid, gid)
            check_stat(uid, gid)
        elif platform.system() in ('HP-UX', 'SunOS'):
            # HP-UX and Solaris can allow a non-root user to chown() to root
            # (issue #5113)
            raise unittest.SkipTest("Skipping because of non-standard chown() "
                                    "behavior")
        else:
            # non-root cannot chown to root, raises OSError
            self.assertRaises(OSError, chown_func, first_param, 0, 0)
            check_stat(uid, gid)
            self.assertRaises(OSError, chown_func, first_param, 0, -1)
            check_stat(uid, gid)
            if 0 not in os.getgroups():
                self.assertRaises(OSError, chown_func, first_param, -1, 0)
                check_stat(uid, gid)
        # test illegal types
        for t in str, float:
            self.assertRaises(TypeError, chown_func, first_param, t(uid), gid)
            check_stat(uid, gid)
            self.assertRaises(TypeError, chown_func, first_param, uid, t(gid))
            check_stat(uid, gid)

    @unittest.skipUnless(hasattr(posix, 'chown'), "test needs os.chown()")
    def test_chown(self):
        # raise an OSError if the file does not exist
        os.unlink(support.TESTFN)
        self.assertRaises(OSError, posix.chown, support.TESTFN, -1, -1)

        # re-create the file
        support.create_empty_file(support.TESTFN)
        self._test_all_chown_common(posix.chown, support.TESTFN, posix.stat)

    @unittest.skipUnless(hasattr(posix, 'fchown'), "test needs os.fchown()")
    def test_fchown(self):
        os.unlink(support.TESTFN)

        # re-create the file
        test_file = open(support.TESTFN, 'w')
        try:
            fd = test_file.fileno()
            self._test_all_chown_common(posix.fchown, fd,
                                        getattr(posix, 'fstat', None))
        finally:
            test_file.close()

    @unittest.skipUnless(hasattr(posix, 'lchown'), "test needs os.lchown()")
    def test_lchown(self):
        os.unlink(support.TESTFN)
        # create a symlink
        os.symlink(_DUMMY_SYMLINK, support.TESTFN)
        self._test_all_chown_common(posix.lchown, support.TESTFN,
                                    getattr(posix, 'lstat', None))

    @unittest.skipUnless(hasattr(posix, 'chdir'), 'test needs posix.chdir()')
    def test_chdir(self):
        posix.chdir(os.curdir)
        self.assertRaises(OSError, posix.chdir, support.TESTFN)

    def test_listdir(self):
        self.assertIn(support.TESTFN, posix.listdir(os.curdir))

    def test_listdir_default(self):
        # When listdir is called without argument,
        # it's the same as listdir(os.curdir).
        self.assertIn(support.TESTFN, posix.listdir())

    def test_listdir_bytes(self):
        # When listdir is called with a bytes object,
        # the returned strings are of type bytes.
        self.assertIn(os.fsencode(support.TESTFN), posix.listdir(b'.'))

    def test_listdir_bytes_like(self):
        for cls in bytearray, memoryview:
            with self.assertWarns(DeprecationWarning):
                names = posix.listdir(cls(b'.'))
            self.assertIn(os.fsencode(support.TESTFN), names)
            for name in names:
                self.assertIs(type(name), bytes)

    @unittest.skipUnless(posix.listdir in os.supports_fd,
                         "test needs fd support for posix.listdir()")
    def test_listdir_fd(self):
        f = posix.open(posix.getcwd(), posix.O_RDONLY)
        self.addCleanup(posix.close, f)
        self.assertEqual(
            sorted(posix.listdir('.')),
            sorted(posix.listdir(f))
            )
        # Check that the fd offset was reset (issue #13739)
        self.assertEqual(
            sorted(posix.listdir('.')),
            sorted(posix.listdir(f))
            )

    @unittest.skipUnless(hasattr(posix, 'access'), 'test needs posix.access()')
    def test_access(self):
        self.assertTrue(posix.access(support.TESTFN, os.R_OK))

    @unittest.skipUnless(hasattr(posix, 'umask'), 'test needs posix.umask()')
    def test_umask(self):
        old_mask = posix.umask(0)
        self.assertIsInstance(old_mask, int)
        posix.umask(old_mask)

    @unittest.skipUnless(hasattr(posix, 'strerror'),
                         'test needs posix.strerror()')
    def test_strerror(self):
        self.assertTrue(posix.strerror(0))

    @unittest.skipUnless(hasattr(posix, 'pipe'), 'test needs posix.pipe()')
    def test_pipe(self):
        reader, writer = posix.pipe()
        os.close(reader)
        os.close(writer)

    @unittest.skipUnless(hasattr(os, 'pipe2'), "test needs os.pipe2()")
    @support.requires_linux_version(2, 6, 27)
    def test_pipe2(self):
        self.assertRaises(TypeError, os.pipe2, 'DEADBEEF')
        self.assertRaises(TypeError, os.pipe2, 0, 0)

        # try calling with flags = 0, like os.pipe()
        r, w = os.pipe2(0)
        os.close(r)
        os.close(w)

        # test flags
        r, w = os.pipe2(os.O_CLOEXEC|os.O_NONBLOCK)
        self.addCleanup(os.close, r)
        self.addCleanup(os.close, w)
        self.assertFalse(os.get_inheritable(r))
        self.assertFalse(os.get_inheritable(w))
        self.assertFalse(os.get_blocking(r))
        self.assertFalse(os.get_blocking(w))
        # try reading from an empty pipe: this should fail, not block
        self.assertRaises(OSError, os.read, r, 1)
        # try a write big enough to fill-up the pipe: this should either
        # fail or perform a partial write, not block
        try:
            os.write(w, b'x' * support.PIPE_MAX_SIZE)
        except OSError:
            pass

    @support.cpython_only
    @unittest.skipUnless(hasattr(os, 'pipe2'), "test needs os.pipe2()")
    @support.requires_linux_version(2, 6, 27)
    def test_pipe2_c_limits(self):
        # Issue 15989
        import _testcapi
        self.assertRaises(OverflowError, os.pipe2, _testcapi.INT_MAX + 1)
        self.assertRaises(OverflowError, os.pipe2, _testcapi.UINT_MAX + 1)

    @unittest.skipUnless(hasattr(posix, 'utime'), 'test needs posix.utime()')
    def test_utime(self):
        now = time.time()
        posix.utime(support.TESTFN, None)
        self.assertRaises(TypeError, posix.utime, support.TESTFN, (None, None))
        self.assertRaises(TypeError, posix.utime, support.TESTFN, (now, None))
        self.assertRaises(TypeError, posix.utime, support.TESTFN, (None, now))
        posix.utime(support.TESTFN, (int(now), int(now)))
        posix.utime(support.TESTFN, (now, now))

    def _test_chflags_regular_file(self, chflags_func, target_file, **kwargs):
        st = os.stat(target_file)
        self.assertTrue(hasattr(st, 'st_flags'))

        # ZFS returns EOPNOTSUPP when attempting to set flag UF_IMMUTABLE.
        flags = st.st_flags | stat.UF_IMMUTABLE
        try:
            chflags_func(target_file, flags, **kwargs)
        except OSError as err:
            if err.errno != errno.EOPNOTSUPP:
                raise
            msg = 'chflag UF_IMMUTABLE not supported by underlying fs'
            self.skipTest(msg)

        try:
            new_st = os.stat(target_file)
            self.assertEqual(st.st_flags | stat.UF_IMMUTABLE, new_st.st_flags)
            try:
                fd = open(target_file, 'w+')
            except OSError as e:
                self.assertEqual(e.errno, errno.EPERM)
        finally:
            posix.chflags(target_file, st.st_flags)

    @unittest.skipUnless(hasattr(posix, 'chflags'), 'test needs os.chflags()')
    def test_chflags(self):
        self._test_chflags_regular_file(posix.chflags, support.TESTFN)

    @unittest.skipUnless(hasattr(posix, 'lchflags'), 'test needs os.lchflags()')
    def test_lchflags_regular_file(self):
        self._test_chflags_regular_file(posix.lchflags, support.TESTFN)
        self._test_chflags_regular_file(posix.chflags, support.TESTFN, follow_symlinks=False)

    @unittest.skipUnless(hasattr(posix, 'lchflags'), 'test needs os.lchflags()')
    def test_lchflags_symlink(self):
        testfn_st = os.stat(support.TESTFN)

        self.assertTrue(hasattr(testfn_st, 'st_flags'))

        os.symlink(support.TESTFN, _DUMMY_SYMLINK)
        self.teardown_files.append(_DUMMY_SYMLINK)
        dummy_symlink_st = os.lstat(_DUMMY_SYMLINK)

        def chflags_nofollow(path, flags):
            return posix.chflags(path, flags, follow_symlinks=False)

        for fn in (posix.lchflags, chflags_nofollow):
            # ZFS returns EOPNOTSUPP when attempting to set flag UF_IMMUTABLE.
            flags = dummy_symlink_st.st_flags | stat.UF_IMMUTABLE
            try:
                fn(_DUMMY_SYMLINK, flags)
            except OSError as err:
                if err.errno != errno.EOPNOTSUPP:
                    raise
                msg = 'chflag UF_IMMUTABLE not supported by underlying fs'
                self.skipTest(msg)
            try:
                new_testfn_st = os.stat(support.TESTFN)
                new_dummy_symlink_st = os.lstat(_DUMMY_SYMLINK)

                self.assertEqual(testfn_st.st_flags, new_testfn_st.st_flags)
                self.assertEqual(dummy_symlink_st.st_flags | stat.UF_IMMUTABLE,
                                 new_dummy_symlink_st.st_flags)
            finally:
                fn(_DUMMY_SYMLINK, dummy_symlink_st.st_flags)

    def test_environ(self):
        if os.name == "nt":
            item_type = str
        else:
            item_type = bytes
        for k, v in posix.environ.items():
            self.assertEqual(type(k), item_type)
            self.assertEqual(type(v), item_type)

    @unittest.skipUnless(hasattr(os, "putenv"), "requires os.putenv()")
    def test_putenv(self):
        with self.assertRaises(ValueError):
            os.putenv('FRUIT\0VEGETABLE', 'cabbage')
        with self.assertRaises(ValueError):
            os.putenv(b'FRUIT\0VEGETABLE', b'cabbage')
        with self.assertRaises(ValueError):
            os.putenv('FRUIT', 'orange\0VEGETABLE=cabbage')
        with self.assertRaises(ValueError):
            os.putenv(b'FRUIT', b'orange\0VEGETABLE=cabbage')
        with self.assertRaises(ValueError):
            os.putenv('FRUIT=ORANGE', 'lemon')
        with self.assertRaises(ValueError):
            os.putenv(b'FRUIT=ORANGE', b'lemon')

    @unittest.skipUnless(hasattr(posix, 'getcwd'), 'test needs posix.getcwd()')
    def test_getcwd_long_pathnames(self):
        dirname = 'getcwd-test-directory-0123456789abcdef-01234567890abcdef'
        curdir = os.getcwd()
        base_path = os.path.abspath(support.TESTFN) + '.getcwd'

        try:
            os.mkdir(base_path)
            os.chdir(base_path)
        except:
            #  Just returning nothing instead of the SkipTest exception, because
            #  the test results in Error in that case.  Is that ok?
            #  raise unittest.SkipTest("cannot create directory for testing")
            return

            def _create_and_do_getcwd(dirname, current_path_length = 0):
                try:
                    os.mkdir(dirname)
                except:
                    raise unittest.SkipTest("mkdir cannot create directory sufficiently deep for getcwd test")

                os.chdir(dirname)
                try:
                    os.getcwd()
                    if current_path_length < 1027:
                        _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1)
                finally:
                    os.chdir('..')
                    os.rmdir(dirname)

            _create_and_do_getcwd(dirname)

        finally:
            os.chdir(curdir)
            support.rmtree(base_path)

    @unittest.skipUnless(hasattr(posix, 'getgrouplist'), "test needs posix.getgrouplist()")
    @unittest.skipUnless(hasattr(pwd, 'getpwuid'), "test needs pwd.getpwuid()")
    @unittest.skipUnless(hasattr(os, 'getuid'), "test needs os.getuid()")
    def test_getgrouplist(self):
        user = pwd.getpwuid(os.getuid())[0]
        group = pwd.getpwuid(os.getuid())[3]
        self.assertIn(group, posix.getgrouplist(user, group))


    @unittest.skipUnless(hasattr(os, 'getegid'), "test needs os.getegid()")
    def test_getgroups(self):
        with os.popen('id -G 2>/dev/null') as idg:
            groups = idg.read().strip()
            ret = idg.close()

        try:
            idg_groups = set(int(g) for g in groups.split())
        except ValueError:
            idg_groups = set()
        if ret is not None or not idg_groups:
            raise unittest.SkipTest("need working 'id -G'")

        # Issues 16698: OS X ABIs prior to 10.6 have limits on getgroups()
        if sys.platform == 'darwin':
            import sysconfig
            dt = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') or '10.0'
            if tuple(int(n) for n in dt.split('.')[0:2]) < (10, 6):
                raise unittest.SkipTest("getgroups(2) is broken prior to 10.6")

        # 'id -G' and 'os.getgroups()' should return the same
        # groups, ignoring order, duplicates, and the effective gid.
        # #10822/#26944 - It is implementation defined whether
        # posix.getgroups() includes the effective gid.
        symdiff = idg_groups.symmetric_difference(posix.getgroups())
        self.assertTrue(not symdiff or symdiff == {posix.getegid()})

    # tests for the posix *at functions follow

    @unittest.skipUnless(os.access in os.supports_dir_fd, "test needs dir_fd support for os.access()")
    def test_access_dir_fd(self):
        f = posix.open(posix.getcwd(), posix.O_RDONLY)
        try:
            self.assertTrue(posix.access(support.TESTFN, os.R_OK, dir_fd=f))
        finally:
            posix.close(f)

    @unittest.skipUnless(os.chmod in os.supports_dir_fd, "test needs dir_fd support in os.chmod()")
    def test_chmod_dir_fd(self):
        os.chmod(support.TESTFN, stat.S_IRUSR)

        f = posix.open(posix.getcwd(), posix.O_RDONLY)
        try:
            posix.chmod(support.TESTFN, stat.S_IRUSR | stat.S_IWUSR, dir_fd=f)

            s = posix.stat(support.TESTFN)
            self.assertEqual(s[0] & stat.S_IRWXU, stat.S_IRUSR | stat.S_IWUSR)
        finally:
            posix.close(f)

    @unittest.skipUnless(os.chown in os.supports_dir_fd, "test needs dir_fd support in os.chown()")
    def test_chown_dir_fd(self):
        support.unlink(support.TESTFN)
        support.create_empty_file(support.TESTFN)

        f = posix.open(posix.getcwd(), posix.O_RDONLY)
        try:
            posix.chown(support.TESTFN, os.getuid(), os.getgid(), dir_fd=f)
        finally:
            posix.close(f)

    @unittest.skipUnless(os.stat in os.supports_dir_fd, "test needs dir_fd support in os.stat()")
    def test_stat_dir_fd(self):
        support.unlink(support.TESTFN)
        with open(support.TESTFN, 'w') as outfile:
            outfile.write("testline\n")

        f = posix.open(posix.getcwd(), posix.O_RDONLY)
        try:
            s1 = posix.stat(support.TESTFN)
            s2 = posix.stat(support.TESTFN, dir_fd=f)
            self.assertEqual(s1, s2)
            s2 = posix.stat(support.TESTFN, dir_fd=None)
            self.assertEqual(s1, s2)
            self.assertRaisesRegex(TypeError, 'should be integer or None, not',
                    posix.stat, support.TESTFN, dir_fd=posix.getcwd())
            self.assertRaisesRegex(TypeError, 'should be integer or None, not',
                    posix.stat, support.TESTFN, dir_fd=float(f))
            self.assertRaises(OverflowError,
                    posix.stat, support.TESTFN, dir_fd=10**20)
        finally:
            posix.close(f)

    @unittest.skipUnless(os.utime in os.supports_dir_fd, "test needs dir_fd support in os.utime()")
    def test_utime_dir_fd(self):
        f = posix.open(posix.getcwd(), posix.O_RDONLY)
        try:
            now = time.time()
            posix.utime(support.TESTFN, None, dir_fd=f)
            posix.utime(support.TESTFN, dir_fd=f)
            self.assertRaises(TypeError, posix.utime, support.TESTFN, now, dir_fd=f)
            self.assertRaises(TypeError, posix.utime, support.TESTFN, (None, None), dir_fd=f)
            self.assertRaises(TypeError, posix.utime, support.TESTFN, (now, None), dir_fd=f)
            self.assertRaises(TypeError, posix.utime, support.TESTFN, (None, now), dir_fd=f)
            self.assertRaises(TypeError, posix.utime, support.TESTFN, (now, "x"), dir_fd=f)
            posix.utime(support.TESTFN, (int(now), int(now)), dir_fd=f)
            posix.utime(support.TESTFN, (now, now), dir_fd=f)
            posix.utime(support.TESTFN,
                    (int(now), int((now - int(now)) * 1e9)), dir_fd=f)
            posix.utime(support.TESTFN, dir_fd=f,
                            times=(int(now), int((now - int(now)) * 1e9)))

            # try dir_fd and follow_symlinks together
            if os.utime in os.supports_follow_symlinks:
                try:
                    posix.utime(support.TESTFN, follow_symlinks=False, dir_fd=f)
                except ValueError:
                    # whoops!  using both together not supported on this platform.
                    pass

        finally:
            posix.close(f)

    @unittest.skipUnless(os.link in os.supports_dir_fd, "test needs dir_fd support in os.link()")
    def test_link_dir_fd(self):
        f = posix.open(posix.getcwd(), posix.O_RDONLY)
        try:
            posix.link(support.TESTFN, support.TESTFN + 'link', src_dir_fd=f, dst_dir_fd=f)
        except PermissionError as e:
            self.skipTest('posix.link(): %s' % e)
        else:
            # should have same inodes
            self.assertEqual(posix.stat(support.TESTFN)[1],
                posix.stat(support.TESTFN + 'link')[1])
        finally:
            posix.close(f)
            support.unlink(support.TESTFN + 'link')

    @unittest.skipUnless(os.mkdir in os.supports_dir_fd, "test needs dir_fd support in os.mkdir()")
    def test_mkdir_dir_fd(self):
        f = posix.open(posix.getcwd(), posix.O_RDONLY)
        try:
            posix.mkdir(support.TESTFN + 'dir', dir_fd=f)
            posix.stat(support.TESTFN + 'dir') # should not raise exception
        finally:
            posix.close(f)
            support.rmtree(support.TESTFN + 'dir')

    @unittest.skipUnless((os.mknod in os.supports_dir_fd) and hasattr(stat, 'S_IFIFO'),
                         "test requires both stat.S_IFIFO and dir_fd support for os.mknod()")
    def test_mknod_dir_fd(self):
        # Test using mknodat() to create a FIFO (the only use specified
        # by POSIX).
        support.unlink(support.TESTFN)
        mode = stat.S_IFIFO | stat.S_IRUSR | stat.S_IWUSR
        f = posix.open(posix.getcwd(), posix.O_RDONLY)
        try:
            posix.mknod(support.TESTFN, mode, 0, dir_fd=f)
        except OSError as e:
            # Some old systems don't allow unprivileged users to use
            # mknod(), or only support creating device nodes.
            self.assertIn(e.errno, (errno.EPERM, errno.EINVAL, errno.EACCES))
        else:
            self.assertTrue(stat.S_ISFIFO(posix.stat(support.TESTFN).st_mode))
        finally:
            posix.close(f)

    @unittest.skipUnless(os.open in os.supports_dir_fd, "test needs dir_fd support in os.open()")
    def test_open_dir_fd(self):
        support.unlink(support.TESTFN)
        with open(support.TESTFN, 'w') as outfile:
            outfile.write("testline\n")
        a = posix.open(posix.getcwd(), posix.O_RDONLY)
        b = posix.open(support.TESTFN, posix.O_RDONLY, dir_fd=a)
        try:
            res = posix.read(b, 9).decode(encoding="utf-8")
            self.assertEqual("testline\n", res)
        finally:
            posix.close(a)
            posix.close(b)

    @unittest.skipUnless(os.readlink in os.supports_dir_fd, "test needs dir_fd support in os.readlink()")
    def test_readlink_dir_fd(self):
        os.symlink(support.TESTFN, support.TESTFN + 'link')
        f = posix.open(posix.getcwd(), posix.O_RDONLY)
        try:
            self.assertEqual(posix.readlink(support.TESTFN + 'link'),
                posix.readlink(support.TESTFN + 'link', dir_fd=f))
        finally:
            support.unlink(support.TESTFN + 'link')
            posix.close(f)

    @unittest.skipUnless(os.rename in os.supports_dir_fd, "test needs dir_fd support in os.rename()")
    def test_rename_dir_fd(self):
        support.unlink(support.TESTFN)
        support.create_empty_file(support.TESTFN + 'ren')
        f = posix.open(posix.getcwd(), posix.O_RDONLY)
        try:
            posix.rename(support.TESTFN + 'ren', support.TESTFN, src_dir_fd=f, dst_dir_fd=f)
        except:
            posix.rename(support.TESTFN + 'ren', support.TESTFN)
            raise
        else:
            posix.stat(support.TESTFN) # should not raise exception
        finally:
            posix.close(f)

    @unittest.skipUnless(os.symlink in os.supports_dir_fd, "test needs dir_fd support in os.symlink()")
    def test_symlink_dir_fd(self):
        f = posix.open(posix.getcwd(), posix.O_RDONLY)
        try:
            posix.symlink(support.TESTFN, support.TESTFN + 'link', dir_fd=f)
            self.assertEqual(posix.readlink(support.TESTFN + 'link'), support.TESTFN)
        finally:
            posix.close(f)
            support.unlink(support.TESTFN + 'link')

    @unittest.skipUnless(os.unlink in os.supports_dir_fd, "test needs dir_fd support in os.unlink()")
    def test_unlink_dir_fd(self):
        f = posix.open(posix.getcwd(), posix.O_RDONLY)
        support.create_empty_file(support.TESTFN + 'del')
        posix.stat(support.TESTFN + 'del') # should not raise exception
        try:
            posix.unlink(support.TESTFN + 'del', dir_fd=f)
        except:
            support.unlink(support.TESTFN + 'del')
            raise
        else:
            self.assertRaises(OSError, posix.stat, support.TESTFN + 'link')
        finally:
            posix.close(f)

    @unittest.skipUnless(os.mkfifo in os.supports_dir_fd, "test needs dir_fd support in os.mkfifo()")
    def test_mkfifo_dir_fd(self):
        support.unlink(support.TESTFN)
        f = posix.open(posix.getcwd(), posix.O_RDONLY)
        try:
            try:
                posix.mkfifo(support.TESTFN,
                             stat.S_IRUSR | stat.S_IWUSR, dir_fd=f)
            except PermissionError as e:
                self.skipTest('posix.mkfifo(): %s' % e)
            self.assertTrue(stat.S_ISFIFO(posix.stat(support.TESTFN).st_mode))
        finally:
            posix.close(f)

    requires_sched_h = unittest.skipUnless(hasattr(posix, 'sched_yield'),
                                           "don't have scheduling support")
    requires_sched_affinity = unittest.skipUnless(hasattr(posix, 'sched_setaffinity'),
                                                  "don't have sched affinity support")

    @requires_sched_h
    def test_sched_yield(self):
        # This has no error conditions (at least on Linux).
        posix.sched_yield()

    @requires_sched_h
    @unittest.skipUnless(hasattr(posix, 'sched_get_priority_max'),
                         "requires sched_get_priority_max()")
    def test_sched_priority(self):
        # Round-robin usually has interesting priorities.
        pol = posix.SCHED_RR
        lo = posix.sched_get_priority_min(pol)
        hi = posix.sched_get_priority_max(pol)
        self.assertIsInstance(lo, int)
        self.assertIsInstance(hi, int)
        self.assertGreaterEqual(hi, lo)
        # OSX evidently just returns 15 without checking the argument.
        if sys.platform != "darwin":
            self.assertRaises(OSError, posix.sched_get_priority_min, -23)
            self.assertRaises(OSError, posix.sched_get_priority_max, -23)

    @requires_sched
    def test_get_and_set_scheduler_and_param(self):
        possible_schedulers = [sched for name, sched in posix.__dict__.items()
                               if name.startswith("SCHED_")]
        mine = posix.sched_getscheduler(0)
        self.assertIn(mine, possible_schedulers)
        try:
            parent = posix.sched_getscheduler(os.getppid())
        except OSError as e:
            if e.errno != errno.EPERM:
                raise
        else:
            self.assertIn(parent, possible_schedulers)
        self.assertRaises(OSError, posix.sched_getscheduler, -1)
        self.assertRaises(OSError, posix.sched_getparam, -1)
        param = posix.sched_getparam(0)
        self.assertIsInstance(param.sched_priority, int)

        # POSIX states that calling sched_setparam() or sched_setscheduler() on
        # a process with a scheduling policy other than SCHED_FIFO or SCHED_RR
        # is implementation-defined: NetBSD and FreeBSD can return EINVAL.
        if not sys.platform.startswith(('freebsd', 'netbsd')):
            try:
                posix.sched_setscheduler(0, mine, param)
                posix.sched_setparam(0, param)
            except OSError as e:
                if e.errno != errno.EPERM:
                    raise
            self.assertRaises(OSError, posix.sched_setparam, -1, param)

        self.assertRaises(OSError, posix.sched_setscheduler, -1, mine, param)
        self.assertRaises(TypeError, posix.sched_setscheduler, 0, mine, None)
        self.assertRaises(TypeError, posix.sched_setparam, 0, 43)
        param = posix.sched_param(None)
        self.assertRaises(TypeError, posix.sched_setparam, 0, param)
        large = 214748364700
        param = posix.sched_param(large)
        self.assertRaises(OverflowError, posix.sched_setparam, 0, param)
        param = posix.sched_param(sched_priority=-large)
        self.assertRaises(OverflowError, posix.sched_setparam, 0, param)

    @unittest.skipUnless(hasattr(posix, "sched_rr_get_interval"), "no function")
    def test_sched_rr_get_interval(self):
        try:
            interval = posix.sched_rr_get_interval(0)
        except OSError as e:
            # This likely means that sched_rr_get_interval is only valid for
            # processes with the SCHED_RR scheduler in effect.
            if e.errno != errno.EINVAL:
                raise
            self.skipTest("only works on SCHED_RR processes")
        self.assertIsInstance(interval, float)
        # Reasonable constraints, I think.
        self.assertGreaterEqual(interval, 0.)
        self.assertLess(interval, 1.)

    @requires_sched_affinity
    def test_sched_getaffinity(self):
        mask = posix.sched_getaffinity(0)
        self.assertIsInstance(mask, set)
        self.assertGreaterEqual(len(mask), 1)
        self.assertRaises(OSError, posix.sched_getaffinity, -1)
        for cpu in mask:
            self.assertIsInstance(cpu, int)
            self.assertGreaterEqual(cpu, 0)
            self.assertLess(cpu, 1 << 32)

    @requires_sched_affinity
    def test_sched_setaffinity(self):
        mask = posix.sched_getaffinity(0)
        if len(mask) > 1:
            # Empty masks are forbidden
            mask.pop()
        posix.sched_setaffinity(0, mask)
        self.assertEqual(posix.sched_getaffinity(0), mask)
        self.assertRaises(OSError, posix.sched_setaffinity, 0, [])
        self.assertRaises(ValueError, posix.sched_setaffinity, 0, [-10])
        self.assertRaises(ValueError, posix.sched_setaffinity, 0, map(int, "0X"))
        self.assertRaises(OverflowError, posix.sched_setaffinity, 0, [1<<128])
        self.assertRaises(OSError, posix.sched_setaffinity, -1, mask)

    def test_rtld_constants(self):
        # check presence of major RTLD_* constants
        posix.RTLD_LAZY
        posix.RTLD_NOW
        posix.RTLD_GLOBAL
        posix.RTLD_LOCAL

    @unittest.skipUnless(hasattr(os, 'SEEK_HOLE'),
                         "test needs an OS that reports file holes")
    def test_fs_holes(self):
        # Even if the filesystem doesn't report holes,
        # if the OS supports it the SEEK_* constants
        # will be defined and will have a consistent
        # behaviour:
        # os.SEEK_DATA = current position
        # os.SEEK_HOLE = end of file position
        with open(support.TESTFN, 'r+b') as fp:
            fp.write(b"hello")
            fp.flush()
            size = fp.tell()
            fno = fp.fileno()
            try :
                for i in range(size):
                    self.assertEqual(i, os.lseek(fno, i, os.SEEK_DATA))
                    self.assertLessEqual(size, os.lseek(fno, i, os.SEEK_HOLE))
                self.assertRaises(OSError, os.lseek, fno, size, os.SEEK_DATA)
                self.assertRaises(OSError, os.lseek, fno, size, os.SEEK_HOLE)
            except OSError :
                # Some OSs claim to support SEEK_HOLE/SEEK_DATA
                # but it is not true.
                # For instance:
                # http://lists.freebsd.org/pipermail/freebsd-amd64/2012-January/014332.html
                raise unittest.SkipTest("OSError raised!")

    def test_path_error2(self):
        """
        Test functions that call path_error2(), providing two filenames in their exceptions.
        """
        for name in ("rename", "replace", "link"):
            function = getattr(os, name, None)
            if function is None:
                continue

            for dst in ("noodly2", support.TESTFN):
                try:
                    function('doesnotexistfilename', dst)
                except OSError as e:
                    self.assertIn("'doesnotexistfilename' -> '{}'".format(dst), str(e))
                    break
            else:
                self.fail("No valid path_error2() test for os." + name)

    def test_path_with_null_character(self):
        fn = support.TESTFN
        fn_with_NUL = fn + '\0'
        self.addCleanup(support.unlink, fn)
        support.unlink(fn)
        fd = None
        try:
            with self.assertRaises(ValueError):
                fd = os.open(fn_with_NUL, os.O_WRONLY | os.O_CREAT) # raises
        finally:
            if fd is not None:
                os.close(fd)
        self.assertFalse(os.path.exists(fn))
        self.assertRaises(ValueError, os.mkdir, fn_with_NUL)
        self.assertFalse(os.path.exists(fn))
        open(fn, 'wb').close()
        self.assertRaises(ValueError, os.stat, fn_with_NUL)

    def test_path_with_null_byte(self):
        fn = os.fsencode(support.TESTFN)
        fn_with_NUL = fn + b'\0'
        self.addCleanup(support.unlink, fn)
        support.unlink(fn)
        fd = None
        try:
            with self.assertRaises(ValueError):
                fd = os.open(fn_with_NUL, os.O_WRONLY | os.O_CREAT) # raises
        finally:
            if fd is not None:
                os.close(fd)
        self.assertFalse(os.path.exists(fn))
        self.assertRaises(ValueError, os.mkdir, fn_with_NUL)
        self.assertFalse(os.path.exists(fn))
        open(fn, 'wb').close()
        self.assertRaises(ValueError, os.stat, fn_with_NUL)

class PosixGroupsTester(unittest.TestCase):

    def setUp(self):
        if posix.getuid() != 0:
            raise unittest.SkipTest("not enough privileges")
        if not hasattr(posix, 'getgroups'):
            raise unittest.SkipTest("need posix.getgroups")
        if sys.platform == 'darwin':
            raise unittest.SkipTest("getgroups(2) is broken on OSX")
        self.saved_groups = posix.getgroups()

    def tearDown(self):
        if hasattr(posix, 'setgroups'):
            posix.setgroups(self.saved_groups)
        elif hasattr(posix, 'initgroups'):
            name = pwd.getpwuid(posix.getuid()).pw_name
            posix.initgroups(name, self.saved_groups[0])

    @unittest.skipUnless(hasattr(posix, 'initgroups'),
                         "test needs posix.initgroups()")
    def test_initgroups(self):
        # find missing group

        g = max(self.saved_groups or [0]) + 1
        name = pwd.getpwuid(posix.getuid()).pw_name
        posix.initgroups(name, g)
        self.assertIn(g, posix.getgroups())

    @unittest.skipUnless(hasattr(posix, 'setgroups'),
                         "test needs posix.setgroups()")
    def test_setgroups(self):
        for groups in [[0], list(range(16))]:
            posix.setgroups(groups)
            self.assertListEqual(groups, posix.getgroups())


class _PosixSpawnMixin:
    # Program which does nothing and exits with status 0 (success)
    NOOP_PROGRAM = (sys.executable, '-I', '-S', '-c', 'pass')
    spawn_func = None

    def python_args(self, *args):
        # Disable site module to avoid side effects. For example,
        # on Fedora 28, if the HOME environment variable is not set,
        # site._getuserbase() calls pwd.getpwuid() which opens
        # /var/lib/sss/mc/passwd but then leaves the file open which makes
        # test_close_file() to fail.
        return (sys.executable, '-I', '-S', *args)

    def test_returns_pid(self):
        pidfile = support.TESTFN
        self.addCleanup(support.unlink, pidfile)
        script = f"""if 1:
            import os
            with open({pidfile!r}, "w") as pidfile:
                pidfile.write(str(os.getpid()))
            """
        args = self.python_args('-c', script)
        pid = self.spawn_func(args[0], args, os.environ)
        self.assertEqual(os.waitpid(pid, 0), (pid, 0))
        with open(pidfile) as f:
            self.assertEqual(f.read(), str(pid))

    def test_no_such_executable(self):
        no_such_executable = 'no_such_executable'
        try:
            pid = self.spawn_func(no_such_executable,
                                  [no_such_executable],
                                  os.environ)
        # bpo-35794: PermissionError can be raised if there are
        # directories in the $PATH that are not accessible.
        except (FileNotFoundError, PermissionError) as exc:
            self.assertEqual(exc.filename, no_such_executable)
        else:
            pid2, status = os.waitpid(pid, 0)
            self.assertEqual(pid2, pid)
            self.assertNotEqual(status, 0)

    def test_specify_environment(self):
        envfile = support.TESTFN
        self.addCleanup(support.unlink, envfile)
        script = f"""if 1:
            import os
            with open({envfile!r}, "w") as envfile:
                envfile.write(os.environ['foo'])
        """
        args = self.python_args('-c', script)
        pid = self.spawn_func(args[0], args,
                              {**os.environ, 'foo': 'bar'})
        self.assertEqual(os.waitpid(pid, 0), (pid, 0))
        with open(envfile) as f:
            self.assertEqual(f.read(), 'bar')

    def test_none_file_actions(self):
        pid = self.spawn_func(
            self.NOOP_PROGRAM[0],
            self.NOOP_PROGRAM,
            os.environ,
            file_actions=None
        )
        self.assertEqual(os.waitpid(pid, 0), (pid, 0))

    def test_empty_file_actions(self):
        pid = self.spawn_func(
            self.NOOP_PROGRAM[0],
            self.NOOP_PROGRAM,
            os.environ,
            file_actions=[]
        )
        self.assertEqual(os.waitpid(pid, 0), (pid, 0))

    def test_resetids_explicit_default(self):
        pid = self.spawn_func(
            sys.executable,
            [sys.executable, '-c', 'pass'],
            os.environ,
            resetids=False
        )
        self.assertEqual(os.waitpid(pid, 0), (pid, 0))

    def test_resetids(self):
        pid = self.spawn_func(
            sys.executable,
            [sys.executable, '-c', 'pass'],
            os.environ,
            resetids=True
        )
        self.assertEqual(os.waitpid(pid, 0), (pid, 0))

    def test_resetids_wrong_type(self):
        with self.assertRaises(TypeError):
            self.spawn_func(sys.executable,
                            [sys.executable, "-c", "pass"],
                            os.environ, resetids=None)

    def test_setpgroup(self):
        pid = self.spawn_func(
            sys.executable,
            [sys.executable, '-c', 'pass'],
            os.environ,
            setpgroup=os.getpgrp()
        )
        self.assertEqual(os.waitpid(pid, 0), (pid, 0))

    def test_setpgroup_wrong_type(self):
        with self.assertRaises(TypeError):
            self.spawn_func(sys.executable,
                            [sys.executable, "-c", "pass"],
                            os.environ, setpgroup="023")

    @unittest.skipUnless(hasattr(signal, 'pthread_sigmask'),
                           'need signal.pthread_sigmask()')
    def test_setsigmask(self):
        code = textwrap.dedent("""\
            import signal
            signal.raise_signal(signal.SIGUSR1)""")

        pid = self.spawn_func(
            sys.executable,
            [sys.executable, '-c', code],
            os.environ,
            setsigmask=[signal.SIGUSR1]
        )
        self.assertEqual(os.waitpid(pid, 0), (pid, 0))

    def test_setsigmask_wrong_type(self):
        with self.assertRaises(TypeError):
            self.spawn_func(sys.executable,
                            [sys.executable, "-c", "pass"],
                            os.environ, setsigmask=34)
        with self.assertRaises(TypeError):
            self.spawn_func(sys.executable,
                            [sys.executable, "-c", "pass"],
                            os.environ, setsigmask=["j"])
        with self.assertRaises(ValueError):
            self.spawn_func(sys.executable,
                            [sys.executable, "-c", "pass"],
                            os.environ, setsigmask=[signal.NSIG,
                                                    signal.NSIG+1])

    def test_setsid(self):
        rfd, wfd = os.pipe()
        self.addCleanup(os.close, rfd)
        try:
            os.set_inheritable(wfd, True)

            code = textwrap.dedent(f"""
                import os
                fd = {wfd}
                sid = os.getsid(0)
                os.write(fd, str(sid).encode())
            """)

            try:
                pid = self.spawn_func(sys.executable,
                                      [sys.executable, "-c", code],
                                      os.environ, setsid=True)
            except NotImplementedError as exc:
                self.skipTest(f"setsid is not supported: {exc!r}")
            except PermissionError as exc:
                self.skipTest(f"setsid failed with: {exc!r}")
        finally:
            os.close(wfd)

        self.assertEqual(os.waitpid(pid, 0), (pid, 0))
        output = os.read(rfd, 100)
        child_sid = int(output)
        parent_sid = os.getsid(os.getpid())
        self.assertNotEqual(parent_sid, child_sid)

    @unittest.skipUnless(hasattr(signal, 'pthread_sigmask'),
                         'need signal.pthread_sigmask()')
    def test_setsigdef(self):
        original_handler = signal.signal(signal.SIGUSR1, signal.SIG_IGN)
        code = textwrap.dedent("""\
            import signal
            signal.raise_signal(signal.SIGUSR1)""")
        try:
            pid = self.spawn_func(
                sys.executable,
                [sys.executable, '-c', code],
                os.environ,
                setsigdef=[signal.SIGUSR1]
            )
        finally:
            signal.signal(signal.SIGUSR1, original_handler)

        pid2, status = os.waitpid(pid, 0)
        self.assertEqual(pid2, pid)
        self.assertTrue(os.WIFSIGNALED(status), status)
        self.assertEqual(os.WTERMSIG(status), signal.SIGUSR1)

    def test_setsigdef_wrong_type(self):
        with self.assertRaises(TypeError):
            self.spawn_func(sys.executable,
                            [sys.executable, "-c", "pass"],
                            os.environ, setsigdef=34)
        with self.assertRaises(TypeError):
            self.spawn_func(sys.executable,
                            [sys.executable, "-c", "pass"],
                            os.environ, setsigdef=["j"])
        with self.assertRaises(ValueError):
            self.spawn_func(sys.executable,
                            [sys.executable, "-c", "pass"],
                            os.environ, setsigdef=[signal.NSIG, signal.NSIG+1])

    @requires_sched
    @unittest.skipIf(sys.platform.startswith(('freebsd', 'netbsd')),
                     "bpo-34685: test can fail on BSD")
    def test_setscheduler_only_param(self):
        policy = os.sched_getscheduler(0)
        priority = os.sched_get_priority_min(policy)
        code = textwrap.dedent(f"""\
            import os, sys
            if os.sched_getscheduler(0) != {policy}:
                sys.exit(101)
            if os.sched_getparam(0).sched_priority != {priority}:
                sys.exit(102)""")
        pid = self.spawn_func(
            sys.executable,
            [sys.executable, '-c', code],
            os.environ,
            scheduler=(None, os.sched_param(priority))
        )
        self.assertEqual(os.waitpid(pid, 0), (pid, 0))

    @requires_sched
    @unittest.skipIf(sys.platform.startswith(('freebsd', 'netbsd')),
                     "bpo-34685: test can fail on BSD")
    def test_setscheduler_with_policy(self):
        policy = os.sched_getscheduler(0)
        priority = os.sched_get_priority_min(policy)
        code = textwrap.dedent(f"""\
            import os, sys
            if os.sched_getscheduler(0) != {policy}:
                sys.exit(101)
            if os.sched_getparam(0).sched_priority != {priority}:
                sys.exit(102)""")
        pid = self.spawn_func(
            sys.executable,
            [sys.executable, '-c', code],
            os.environ,
            scheduler=(policy, os.sched_param(priority))
        )
        self.assertEqual(os.waitpid(pid, 0), (pid, 0))

    def test_multiple_file_actions(self):
        file_actions = [
            (os.POSIX_SPAWN_OPEN, 3, os.path.realpath(__file__), os.O_RDONLY, 0),
            (os.POSIX_SPAWN_CLOSE, 0),
            (os.POSIX_SPAWN_DUP2, 1, 4),
        ]
        pid = self.spawn_func(self.NOOP_PROGRAM[0],
                              self.NOOP_PROGRAM,
                              os.environ,
                              file_actions=file_actions)
        self.assertEqual(os.waitpid(pid, 0), (pid, 0))

    def test_bad_file_actions(self):
        args = self.NOOP_PROGRAM
        with self.assertRaises(TypeError):
            self.spawn_func(args[0], args, os.environ,
                            file_actions=[None])
        with self.assertRaises(TypeError):
            self.spawn_func(args[0], args, os.environ,
                            file_actions=[()])
        with self.assertRaises(TypeError):
            self.spawn_func(args[0], args, os.environ,
                            file_actions=[(None,)])
        with self.assertRaises(TypeError):
            self.spawn_func(args[0], args, os.environ,
                            file_actions=[(12345,)])
        with self.assertRaises(TypeError):
            self.spawn_func(args[0], args, os.environ,
                            file_actions=[(os.POSIX_SPAWN_CLOSE,)])
        with self.assertRaises(TypeError):
            self.spawn_func(args[0], args, os.environ,
                            file_actions=[(os.POSIX_SPAWN_CLOSE, 1, 2)])
        with self.assertRaises(TypeError):
            self.spawn_func(args[0], args, os.environ,
                            file_actions=[(os.POSIX_SPAWN_CLOSE, None)])
        with self.assertRaises(ValueError):
            self.spawn_func(args[0], args, os.environ,
                            file_actions=[(os.POSIX_SPAWN_OPEN,
                                           3, __file__ + '\0',
                                           os.O_RDONLY, 0)])

    def test_open_file(self):
        outfile = support.TESTFN
        self.addCleanup(support.unlink, outfile)
        script = """if 1:
            import sys
            sys.stdout.write("hello")
            """
        file_actions = [
            (os.POSIX_SPAWN_OPEN, 1, outfile,
                os.O_WRONLY | os.O_CREAT | os.O_TRUNC,
                stat.S_IRUSR | stat.S_IWUSR),
        ]
        args = self.python_args('-c', script)
        pid = self.spawn_func(args[0], args, os.environ,
                              file_actions=file_actions)
        self.assertEqual(os.waitpid(pid, 0), (pid, 0))
        with open(outfile) as f:
            self.assertEqual(f.read(), 'hello')

    def test_close_file(self):
        closefile = support.TESTFN
        self.addCleanup(support.unlink, closefile)
        script = f"""if 1:
            import os
            try:
                os.fstat(0)
            except OSError as e:
                with open({closefile!r}, 'w') as closefile:
                    closefile.write('is closed %d' % e.errno)
            """
        args = self.python_args('-c', script)
        pid = self.spawn_func(args[0], args, os.environ,
                              file_actions=[(os.POSIX_SPAWN_CLOSE, 0)])
        self.assertEqual(os.waitpid(pid, 0), (pid, 0))
        with open(closefile) as f:
            self.assertEqual(f.read(), 'is closed %d' % errno.EBADF)

    def test_dup2(self):
        dupfile = support.TESTFN
        self.addCleanup(support.unlink, dupfile)
        script = """if 1:
            import sys
            sys.stdout.write("hello")
            """
        with open(dupfile, "wb") as childfile:
            file_actions = [
                (os.POSIX_SPAWN_DUP2, childfile.fileno(), 1),
            ]
            args = self.python_args('-c', script)
            pid = self.spawn_func(args[0], args, os.environ,
                                  file_actions=file_actions)
            self.assertEqual(os.waitpid(pid, 0), (pid, 0))
        with open(dupfile) as f:
            self.assertEqual(f.read(), 'hello')


@unittest.skipUnless(hasattr(os, 'posix_spawn'), "test needs os.posix_spawn")
class TestPosixSpawn(unittest.TestCase, _PosixSpawnMixin):
    spawn_func = getattr(posix, 'posix_spawn', None)


@unittest.skipUnless(hasattr(os, 'posix_spawnp'), "test needs os.posix_spawnp")
class TestPosixSpawnP(unittest.TestCase, _PosixSpawnMixin):
    spawn_func = getattr(posix, 'posix_spawnp', None)

    @support.skip_unless_symlink
    def test_posix_spawnp(self):
        # Use a symlink to create a program in its own temporary directory
        temp_dir = tempfile.mkdtemp()
        self.addCleanup(support.rmtree, temp_dir)

        program = 'posix_spawnp_test_program.exe'
        program_fullpath = os.path.join(temp_dir, program)
        os.symlink(sys.executable, program_fullpath)

        try:
            path = os.pathsep.join((temp_dir, os.environ['PATH']))
        except KeyError:
            path = temp_dir   # PATH is not set

        spawn_args = (program, '-I', '-S', '-c', 'pass')
        code = textwrap.dedent("""
            import os
            args = %a
            pid = os.posix_spawnp(args[0], args, os.environ)
            pid2, status = os.waitpid(pid, 0)
            if pid2 != pid:
                raise Exception(f"pid {pid2} != {pid}")
            if status != 0:
                raise Exception(f"status {status} != 0")
        """ % (spawn_args,))

        # Use a subprocess to test os.posix_spawnp() with a modified PATH
        # environment variable: posix_spawnp() uses the current environment
        # to locate the program, not its environment argument.
        args = ('-c', code)
        assert_python_ok(*args, PATH=path)


def test_main():
    try:
        support.run_unittest(
            PosixTester,
            PosixGroupsTester,
            TestPosixSpawn,
            TestPosixSpawnP,
        )
    finally:
        support.reap_children()

if __name__ == '__main__':
    test_main()


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
25 Oct 2024 11.52 AM
root / linksafe
0755
__pycache__
--
25 Oct 2024 11.54 AM
root / linksafe
0755
audiodata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
capath
--
25 Oct 2024 11.54 AM
root / linksafe
0755
cjkencodings
--
25 Oct 2024 11.54 AM
root / linksafe
0755
data
--
25 Oct 2024 11.54 AM
root / linksafe
0755
decimaltestdata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
dtracedata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
eintrdata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
encoded_modules
--
25 Oct 2024 11.54 AM
root / linksafe
0755
imghdrdata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
libregrtest
--
25 Oct 2024 11.54 AM
root / linksafe
0755
sndhdrdata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
subprocessdata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
support
--
25 Oct 2024 11.54 AM
root / linksafe
0755
test_asyncio
--
25 Oct 2024 11.54 AM
root / linksafe
0755
test_email
--
25 Oct 2024 11.54 AM
root / linksafe
0755
test_import
--
25 Oct 2024 11.54 AM
root / linksafe
0755
test_importlib
--
25 Oct 2024 11.54 AM
root / linksafe
0755
test_json
--
25 Oct 2024 11.54 AM
root / linksafe
0755
test_warnings
--
25 Oct 2024 11.54 AM
root / linksafe
0755
tracedmodules
--
25 Oct 2024 11.54 AM
root / linksafe
0755
xmltestdata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
ziptestdata
--
25 Oct 2024 11.54 AM
root / linksafe
0755
Sine-1000Hz-300ms.aif
60.25 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
__init__.py
0.046 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
__main__.py
0.04 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
_test_multiprocessing.py
183.479 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
allsans.pem
9.868 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ann_module.py
1.078 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ann_module2.py
0.507 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ann_module3.py
0.438 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
audiotest.au
27.484 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
audiotests.py
12.462 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
audit-tests.py
9.082 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
autotest.py
0.204 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
bad_coding.py
0.023 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
bad_coding2.py
0.029 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
bad_getattr.py
0.06 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
bad_getattr2.py
0.075 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
bad_getattr3.py
0.136 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badcert.pem
1.883 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badkey.pem
2.111 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_3131.py
0.031 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_future10.py
0.093 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_future3.py
0.168 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_future4.py
0.149 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_future5.py
0.18 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_future6.py
0.157 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_future7.py
0.191 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_future8.py
0.119 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_future9.py
0.139 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
badsyntax_pep3120.py
0.014 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
bisect_cmd.py
4.862 KB
6 Sep 2024 8.41 PM
root / linksafe
0755
bytecode_helper.py
1.563 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
cfgparser.1
0.065 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
cfgparser.2
19.016 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
cfgparser.3
1.55 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
clinic.test
94.653 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
cmath_testcases.txt
141.047 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
coding20731.py
0.021 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
curses_tests.py
1.225 KB
6 Sep 2024 8.41 PM
root / linksafe
0755
dataclass_module_1.py
0.817 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
dataclass_module_1_str.py
0.815 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
dataclass_module_2.py
0.738 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
dataclass_module_2_str.py
0.736 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
dataclass_textanno.py
0.123 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
datetimetester.py
239.839 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
dis_module.py
0.074 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
doctest_aliases.py
0.234 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
double_const.py
1.184 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
empty.vbs
0.068 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
exception_hierarchy.txt
1.779 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ffdh3072.pem
2.16 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
final_a.py
0.401 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
final_b.py
0.401 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
floating_points.txt
15.92 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
fork_wait.py
2.53 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
formatfloat_testcases.txt
7.451 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
future_test1.py
0.224 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
future_test2.py
0.146 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
gdb_sample.py
0.149 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
good_getattr.py
0.193 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
idnsans.pem
9.713 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ieee754.txt
3.206 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
imp_dummy.py
0.062 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
inspect_fodder.py
1.882 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
inspect_fodder2.py
2.061 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
keycert.passwd.pem
4.126 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
keycert.pem
3.963 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
keycert2.pem
3.982 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
keycert3.pem
9.227 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
keycert4.pem
9.24 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
keycertecc.pem
5.505 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
list_tests.py
16.539 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
lock_tests.py
28.265 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
mailcap.txt
1.24 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
make_ssl_certs.py
9.246 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
mapping_tests.py
21.746 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
math_testcases.txt
23.186 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
memory_watchdog.py
0.839 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
mime.types
47.372 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
mock_socket.py
3.526 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
mod_generics_cache.py
1.133 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
mp_fork_bomb.py
0.438 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
mp_preload.py
0.343 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
multibytecodec_support.py
14.169 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
nokia.pem
1.878 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
nosan.pem
7.538 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
nullbytecert.pem
5.308 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
nullcert.pem
0 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
outstanding_bugs.py
0.361 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
pickletester.py
135.991 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
profilee.py
2.97 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
pstats.pck
65.046 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
pycacert.pem
5.531 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
pycakey.pem
2.426 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
pyclbr_input.py
0.633 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
pydoc_mod.py
0.696 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
pydocfodder.py
6.184 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
pythoninfo.py
20.343 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
randv2_32.pck
7.341 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
randv2_64.pck
7.192 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
randv3.pck
7.816 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
re_tests.py
25.941 KB
6 Sep 2024 8.41 PM
root / linksafe
0755
recursion.tar
0.504 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
regrtest.py
1.345 KB
6 Sep 2024 8.41 PM
root / linksafe
0755
relimport.py
0.026 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
reperf.py
0.525 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
revocation.crl
0.781 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
sample_doctest.py
1.017 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
sample_doctest_no_docstrings.py
0.222 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
sample_doctest_no_doctests.py
0.263 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
secp384r1.pem
0.25 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
selfsigned_pythontestdotnet.pem
2.08 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
seq_tests.py
14.183 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
sgml_input.html
8.1 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
signalinterproctester.py
2.696 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
sortperf.py
4.693 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ssl_cert.pem
1.533 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ssl_key.passwd.pem
2.592 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ssl_key.pem
2.43 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ssl_servers.py
7.042 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
ssltests.py
1.026 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
string_tests.py
64.649 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
talos-2019-0758.pem
1.299 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test___all__.py
4.116 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test___future__.py
2.364 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test__locale.py
7.831 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test__opcode.py
3.034 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test__osx_support.py
13.655 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test__xxsubinterpreters.py
68.695 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_abc.py
18.001 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_abstract_numbers.py
1.492 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_aifc.py
17.684 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_argparse.py
172.665 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_array.py
52.573 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_asdl_parser.py
4.146 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ast.py
88.923 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_asyncgen.py
31.444 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_asynchat.py
9.284 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_asyncore.py
25.812 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_atexit.py
5.812 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_audioop.py
28.236 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_audit.py
4.192 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_augassign.py
7.684 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_base64.py
30.169 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_baseexception.py
6.864 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_bdb.py
41.548 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_bigaddrspace.py
2.92 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_bigmem.py
44.883 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_binascii.py
17.995 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_binhex.py
1.793 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_binop.py
14.14 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_bisect.py
13.633 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_bool.py
12.484 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_buffer.py
160.038 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_bufio.py
2.536 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_builtin.py
78.381 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_bytes.py
72.227 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_bz2.py
36.762 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_c_locale_coercion.py
18.82 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_calendar.py
48.715 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_call.py
20.885 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_capi.py
30.463 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_cgi.py
22.146 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_cgitb.py
2.505 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_charmapcodec.py
1.678 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_class.py
17.418 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_clinic.py
21.707 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_cmath.py
24.066 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_cmd.py
6.103 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_cmd_line.py
35.38 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_cmd_line_script.py
31.456 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_code.py
13.658 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_code_module.py
5.514 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codeccallbacks.py
40.967 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecencodings_cn.py
3.857 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecencodings_hk.py
0.685 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecencodings_iso2022.py
3.654 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecencodings_jp.py
4.792 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecencodings_kr.py
2.957 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecencodings_tw.py
0.665 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecmaps_cn.py
0.729 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecmaps_hk.py
0.377 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecmaps_jp.py
1.703 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecmaps_kr.py
1.16 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecmaps_tw.py
0.688 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codecs.py
129.645 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_codeop.py
7.973 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_collections.py
83.957 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_colorsys.py
3.835 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_compare.py
3.822 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_compile.py
37.073 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_compileall.py
26.704 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_complex.py
30.24 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_concurrent_futures.py
44.932 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_configparser.py
84.926 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_contains.py
3.485 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_context.py
30.744 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_contextlib.py
32.541 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_contextlib_async.py
14.819 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_copy.py
25.813 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_copyreg.py
4.393 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_coroutines.py
62.517 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_cprofile.py
6.325 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_crashers.py
1.169 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_crypt.py
3.968 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_csv.py
47.774 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ctypes.py
0.18 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_curses.py
45.472 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dataclasses.py
108.797 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_datetime.py
2.149 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dbm.py
6.447 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dbm_dumb.py
10.613 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dbm_gnu.py
6.217 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dbm_ndbm.py
5.054 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_decimal.py
207.145 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_decorators.py
9.477 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_defaultdict.py
5.876 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_deque.py
34.459 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_descr.py
190.584 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_descrtut.py
11.527 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_devpoll.py
4.5 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dict.py
45 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dict_version.py
5.881 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dictcomps.py
4.417 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dictviews.py
11.684 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_difflib.py
19.637 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_difflib_expect.html
100.846 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dis.py
48.396 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_distutils.py
0.366 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_doctest.py
98.672 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_doctest.txt
0.293 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_doctest2.py
2.304 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_doctest2.txt
0.383 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_doctest3.txt
0.08 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_doctest4.txt
0.238 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_docxmlrpc.py
8.673 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dtrace.py
5.23 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dummy_thread.py
9.694 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dummy_threading.py
1.702 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dynamic.py
4.291 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_dynamicclassattribute.py
9.565 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_eintr.py
1.321 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_embed.py
49.229 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ensurepip.py
9.828 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_enum.py
113.676 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_enumerate.py
8.463 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_eof.py
1.943 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_epoll.py
9.03 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_errno.py
1.044 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_exception_hierarchy.py
7.432 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_exception_variations.py
3.855 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_exceptions.py
49.809 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_extcall.py
13.492 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_faulthandler.py
28.132 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_fcntl.py
6.215 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_file.py
11.017 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_file_eintr.py
10.6 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_filecmp.py
8.686 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_fileinput.py
37.335 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_fileio.py
19.965 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_finalization.py
14.657 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_float.py
63.405 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_flufl.py
1.315 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_fnmatch.py
5.065 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_fork1.py
3.673 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_format.py
22.575 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_fractions.py
29.835 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_frame.py
5.67 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_frozen.py
0.921 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_fstring.py
46.158 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ftplib.py
39.707 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_funcattrs.py
13.545 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_functools.py
90.594 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_future.py
11.901 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_future3.py
0.479 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_future4.py
0.217 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_future5.py
0.498 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_gc.py
40.488 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_gdb.py
40.875 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_generator_stop.py
0.921 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_generators.py
58.515 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_genericclass.py
9.282 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_genericpath.py
21.7 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_genexps.py
7.117 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_getargs2.py
49.997 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_getopt.py
6.748 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_getpass.py
6.286 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_gettext.py
41.381 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_glob.py
13.032 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_global.py
1.309 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_grammar.py
57.501 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_grp.py
3.543 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_gzip.py
29.898 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_hash.py
11.447 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_hashlib.py
39.856 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_heapq.py
16.398 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_hmac.py
22.244 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_html.py
4.234 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_htmlparser.py
33.193 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_http_cookiejar.py
78.357 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_http_cookies.py
20.016 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_httplib.py
76.977 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_httpservers.py
49.479 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_idle.py
0.806 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_imaplib.py
38.95 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_imghdr.py
4.655 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_imp.py
17.733 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_index.py
8.371 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_inspect.py
151.785 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_int.py
28.414 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_int_literal.py
6.888 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_io.py
163.942 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ioctl.py
3.2 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ipaddress.py
94.413 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_isinstance.py
10.255 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_iter.py
31.808 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_iterlen.py
7.096 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_itertools.py
101.411 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_keyword.py
1.234 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_keywordonlyarg.py
6.853 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_kqueue.py
8.756 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_largefile.py
6.831 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_lib2to3.py
0.099 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_linecache.py
7.793 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_list.py
7.84 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_listcomps.py
3.763 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_lltrace.py
0.988 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_locale.py
23.865 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_logging.py
182.435 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_long.py
53.215 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_longexp.py
0.228 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_lzma.py
87.923 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_mailbox.py
91.922 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_mailcap.py
10.03 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_marshal.py
20.571 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_math.py
82.178 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_memoryio.py
31.483 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_memoryview.py
17.783 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_metaclass.py
6.201 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_mimetypes.py
12.139 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_minidom.py
67.344 KB
23 Sep 2024 11.15 AM
root / linksafe
0644
test_mmap.py
29.229 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_module.py
10.302 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_modulefinder.py
12.199 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_msilib.py
5.062 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_multibytecodec.py
15.037 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_multiprocessing_fork.py
0.466 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_multiprocessing_forkserver.py
0.383 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_multiprocessing_main_handling.py
11.446 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_multiprocessing_spawn.py
0.271 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_named_expressions.py
16.514 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_netrc.py
5.962 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_nis.py
1.129 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_nntplib.py
61.695 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_normalization.py
3.659 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ntpath.py
35.081 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_numeric_tower.py
7.18 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_opcodes.py
3.605 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_openpty.py
0.586 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_operator.py
23.544 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_optparse.py
60.994 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ordered_dict.py
30.218 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_os.py
150.991 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ossaudiodev.py
7.057 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_osx_env.py
1.297 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_parser.py
35.724 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pathlib.py
97.12 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pdb.py
55.359 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_peepholer.py
19.408 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pickle.py
19.164 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_picklebuffer.py
4.958 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pickletools.py
4.33 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pipes.py
6.586 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pkg.py
9.594 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pkgimport.py
2.665 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pkgutil.py
19.245 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_platform.py
14.313 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_plistlib.py
41.426 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_poll.py
7.234 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_popen.py
1.978 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_poplib.py
16.973 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_positional_only_arg.py
17.498 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_posix.py
75.758 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_posixpath.py
29.186 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pow.py
5.439 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pprint.py
43.849 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_print.py
7.37 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_profile.py
8.721 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_property.py
8.77 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pstats.py
3.035 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pty.py
11.968 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pulldom.py
12.664 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pwd.py
4.168 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_py_compile.py
10.854 KB
23 Sep 2024 11.15 AM
root / linksafe
0644
test_pyclbr.py
10.003 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pydoc.py
56.983 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_pyexpat.py
27.706 KB
23 Sep 2024 11.15 AM
root / linksafe
0644
test_queue.py
20.355 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_quopri.py
7.775 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_raise.py
12.859 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_random.py
45.59 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_range.py
23.351 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_re.py
106.407 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_readline.py
13.295 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_regrtest.py
46.36 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_repl.py
3.955 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_reprlib.py
15.115 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_resource.py
7.021 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_richcmp.py
11.91 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_rlcompleter.py
6.298 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_robotparser.py
10.688 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_runpy.py
33.855 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sax.py
47.745 KB
23 Sep 2024 11.15 AM
root / linksafe
0644
test_sched.py
6.407 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_scope.py
19.704 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_script_helper.py
5.777 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_secrets.py
4.278 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_select.py
2.693 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_selectors.py
17.788 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_set.py
64.411 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_setcomps.py
3.703 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_shelve.py
6.244 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_shlex.py
13.291 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_shutil.py
102.108 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_signal.py
46.615 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_site.py
26.216 KB
23 Sep 2024 11.15 AM
root / linksafe
0644
test_slice.py
8.247 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_smtpd.py
40.145 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_smtplib.py
56.508 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_smtpnet.py
2.868 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sndhdr.py
1.426 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_socket.py
237.219 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_socketserver.py
17.699 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sort.py
13.425 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_source_encoding.py
7.891 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_spwd.py
2.709 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sqlite.py
0.926 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ssl.py
214.821 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_startfile.py
1.293 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_stat.py
8.303 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_statistics.py
106.497 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_strftime.py
7.542 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_string.py
19.797 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_string_literals.py
9.877 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_stringprep.py
3.04 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_strptime.py
34.424 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_strtod.py
20.056 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_struct.py
34.411 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_structmembers.py
4.703 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_structseq.py
3.871 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_subclassinit.py
8.118 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_subprocess.py
142.636 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sunau.py
6.068 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sundry.py
2.073 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_super.py
9.598 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_support.py
24.115 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_symbol.py
2.059 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_symtable.py
9.133 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_syntax.py
25.753 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sys.py
55.681 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sys_setprofile.py
12.31 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sys_settrace.py
43.085 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_sysconfig.py
17.014 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_syslog.py
1.15 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tabnanny.py
13.437 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tarfile.py
144.04 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tcl.py
30.742 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_telnetlib.py
12.698 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tempfile.py
58.506 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_textwrap.py
38.838 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_thread.py
8.405 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_threaded_import.py
8.898 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_threadedtempfile.py
1.854 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_threading.py
47.516 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_threading_local.py
6.088 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_threadsignals.py
10.092 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_time.py
38.435 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_timeit.py
14.799 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_timeout.py
11.189 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tix.py
0.738 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tk.py
0.354 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tokenize.py
63.185 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_trace.py
19.894 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_traceback.py
46.97 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tracemalloc.py
37.408 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ttk_guionly.py
0.729 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ttk_textonly.py
0.292 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_tuple.py
18.854 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_turtle.py
12.785 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_type_comments.py
10.13 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_typechecks.py
2.554 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_types.py
57.998 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_typing.py
122.047 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_ucn.py
9.352 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unary.py
1.626 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unicode.py
129.936 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unicode_file.py
5.741 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unicode_file_functions.py
6.84 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unicode_identifiers.py
0.87 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unicodedata.py
12.702 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unittest.py
0.279 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_univnewlines.py
3.83 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unpack.py
3.014 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_unpack_ex.py
8.731 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_urllib.py
71.238 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_urllib2.py
79.438 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_urllib2_localnet.py
24.242 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_urllib2net.py
12.394 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_urllib_response.py
1.688 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_urllibnet.py
8.901 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_urlparse.py
70.385 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_userdict.py
7.638 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_userlist.py
1.969 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_userstring.py
2.403 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_utf8_mode.py
9.216 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_utf8source.py
1.147 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_uu.py
8.834 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_uuid.py
35.744 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_venv.py
20.456 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_wait3.py
1.155 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_wait4.py
1.154 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_wave.py
6.573 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_weakref.py
69.467 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_weakset.py
15.025 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_webbrowser.py
10.471 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_winconsoleio.py
6.14 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_winreg.py
21.382 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_winsound.py
4.567 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_with.py
25.779 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_wsgiref.py
30.104 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_xdrlib.py
2.174 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_xml_dom_minicompat.py
4.182 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_xml_etree.py
148.399 KB
23 Sep 2024 11.15 AM
root / linksafe
0644
test_xml_etree_c.py
8.058 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_xmlrpc.py
56.342 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_xmlrpc_net.py
0.991 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_xxtestfuzz.py
0.654 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_yield_from.py
30.014 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_zipapp.py
15.92 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_zipfile.py
121.048 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_zipfile64.py
5.801 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_zipimport.py
29.275 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_zipimport_support.py
10.438 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
test_zlib.py
34.542 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
testcodec.py
1.021 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
testtar.tar
425 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
tf_inherit_check.py
0.697 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
threaded_import_hangers.py
1.449 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
time_hashlib.py
2.874 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt
0.433 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
tokenize_tests-no-coding-cookie-and-utf8-bom-sig-only.txt
0.295 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt
0.411 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
tokenize_tests-utf8-coding-cookie-and-utf8-bom-sig.txt
0.318 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
tokenize_tests.txt
2.653 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
win_console_handler.py
1.383 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
xmltests.py
0.487 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
zip_cp437_header.zip
0.264 KB
6 Sep 2024 8.41 PM
root / linksafe
0644
zipdir.zip
0.365 KB
6 Sep 2024 8.41 PM
root / linksafe
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF