summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in ↵Irit Katriel2021-06-241-2/+5
| | | | tests (GH-26905)
* bpo-43651: Fix EncodingWarning in `os.fdopen()` and test_os (GH-25654)Inada Naoki2021-04-291-9/+12
|
* bpo-42780: Fix set_inheritable() for O_PATH file descriptors on Linux (GH-24172)cptpcrd2021-01-201-0/+27
|
* bpo-31904: Disable os.popen and popen test cases on VxWorks (GH-21687)pxinwr2020-12-151-0/+2
|
* bpo-31904: Fix test_os.test_getcwd_long_path() failure for VxWorks (GH-20256)pxinwr2020-11-281-0/+4
|
* bpo-41625: Skip os.splice() tests on AIX (GH-23354)Victor Stinner2020-11-171-0/+8
| | | | On AIX, splice() only works with a socket, whereas the test uses a pipe.
* bpo-41625: Expose the splice() system call in the os module (GH-21947)Pablo Galindo2020-11-171-0/+117
|
* bpo-41001: Add os.eventfd() (#20930)Christian Heimes2020-11-131-0/+86
| | | Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* bpo-40275: Remove test helpers aliases in test.support (GH-21771)Hai Shi2020-08-081-2/+3
|
* bpo-40275: Use new test.support helper submodules in tests (GH-21169)Hai Shi2020-06-301-171/+174
|
* bpo-41069: Make TESTFN and the CWD for tests containing non-ascii ↵Serhiy Storchaka2020-06-251-3/+3
| | | | characters. (GH-21035)
* bpo-40275: Adding threading_helper submodule in test.support (GH-20263)Hai Shi2020-05-271-2/+3
|
* bpo-40165: Suppress stderr when checking if test_stty_match should be ↵Batuhan Taskaya2020-05-161-1/+5
| | | | skipped (GH-19325)
* bpo-40275: Avoid importing socket in test.support (GH-19603)Serhiy Storchaka2020-04-251-1/+2
| | | | | | * Move socket related functions from test.support to socket_helper. * Import socket, nntplib and urllib.error lazily in transient_internet(). * Remove importing multiprocess.
* bpo-40138: Fix Windows os.waitpid() for large exit code (GH-19637)Victor Stinner2020-04-221-21/+51
| | | | | | | | Fix the Windows implementation of os.waitpid() for exit code larger than "INT_MAX >> 8". The exit status is now interpreted as an unsigned number. os.waitstatus_to_exitcode() now accepts wait status larger than INT_MAX.
* bpo-39481: Implementation for PEP 585 (#18239)Guido van Rossum2020-04-071-1/+2
| | | | | | | | | | | | This implements things like `list[int]`, which returns an object of type `types.GenericAlias`. This object mostly acts as a proxy for `list`, but has attributes `__origin__` and `__args__` that allow recovering the parts (with values `list` and `(int,)`. There is also an approximate notion of type variables; e.g. `list[T]` has a `__parameters__` attribute equal to `(T,)`. Type variables are objects of type `typing.TypeVar`.
* bpo-40094: Add os.waitstatus_to_exitcode() (GH-19201)Victor Stinner2020-04-011-0/+29
| | | | | | | | | | | | | | Add os.waitstatus_to_exitcode() function to convert a wait status to an exitcode. Suggest waitstatus_to_exitcode() usage in the documentation when appropriate. Use waitstatus_to_exitcode() in: * multiprocessing, os, subprocess and _bootsubprocess modules; * test.support.wait_process(); * setup.py: run_command(); * and many tests.
* bpo-40094: Add test.support.wait_process() (GH-19254)Victor Stinner2020-03-311-10/+2
| | | | | | | | | Moreover, the following tests now check the child process exit code: * test_os.PtyTests * test_mailbox.test_lock_conflict() * test_tempfile.test_process_awareness() * test_uuid.testIssue8621() * multiprocessing resource tracker tests
* bpo-36144: Update os.environ and os.environb for PEP 584 (#18911)Charles Burkland2020-03-131-0/+90
|
* bpo-39395: putenv() and unsetenv() always available (GH-18135)Victor Stinner2020-01-241-4/+0
| | | | | | | | The os.putenv() and os.unsetenv() functions are now always available. On non-Windows platforms, Python now requires setenv() and unsetenv() functions to build. Remove putenv_dict from posixmodule.c: it's not longer needed.
* bpo-39413: Implement os.unsetenv() on Windows (GH-18163)Victor Stinner2020-01-241-8/+35
| | | The os.unsetenv() function is now also available on Windows.
* Revert "bpo-39413: Implement os.unsetenv() on Windows (GH-18104)" (GH-18124)Victor Stinner2020-01-221-3/+8
| | | This reverts commit 56cd3710a1ea3ba872d345ea1bebc86ed08bc8b8.
* bpo-39413: Implement os.unsetenv() on Windows (GH-18104)Victor Stinner2020-01-211-8/+3
| | | | | The os.unsetenv() function is now also available on Windows. It is implemented with SetEnvironmentVariableW(name, NULL).
* bpo-38878: Fix os.PathLike __subclasshook__ (GH-17336)Bar Harel2019-12-221-0/+8
| | | | Quick subclasshook fix using the same method is being used in collections.abc (up to a certain degree).
* bpo-38994: Implement __class_getitem__ for PathLike (GH-17498)Batuhan Taşkaya2019-12-081-0/+3
| | | https://bugs.python.org/issue38994
* bpo-35381 Remove all static state from posixmodule (GH-15892)Eddie Elizondo2019-11-051-0/+30
| | | | | | | | | | | | | | After #9665, this moves the remaining types in posixmodule to be heap-allocated to make it compatible with PEP384 as well as modifying all the type accessors to fully make the type opaque. The original PR that got messed up a rebase: https://github.com/python/cpython/pull/10854. All the issues in that commit have now been addressed since https://github.com/python/cpython/pull/11661 got committed. This change also removes any state from the data segment and onto the module state itself. https://bugs.python.org/issue35381 Automerge-Triggered-By: @encukou
* bpo-38378: Rename parameters "out" and "in" of os.sendfile(). (GH-16742)Serhiy Storchaka2019-10-131-4/+5
| | | | | | | They conflicted with keyword "in". Also rename positional-only parameters of private os._fcopyfile() for consistency.
* bpo-37935: Added tests for os.walk(), glob.iglob() and Path.glob() (GH-15956)Serhiy Storchaka2019-09-121-0/+25
| | | | | Test that they do not keep too many file descriptors open for the host OS in a reasonable test scenario. See [bpo-37935](https://bugs.python.org/issue37935).
* bpo-38030: Fix os.stat failures on block devices on Windows (GH-15681)Steve Dower2019-09-041-0/+8
|
* bpo-37549: os.dup() fails for standard streams on Windows 7 (GH-15389)Zackery Spytz2019-08-231-0/+5
|
* bpo-37834: Fix test on Windows 7 (GH-15377)Steve Dower2019-08-221-0/+3
|
* bpo-37834: Normalise handling of reparse points on Windows (GH-15231)Steve Dower2019-08-211-14/+47
| | | | | | | | | | bpo-37834: Normalise handling of reparse points on Windows * ntpath.realpath() and nt.stat() will traverse all supported reparse points (previously was mixed) * nt.lstat() will let the OS traverse reparse points that are not name surrogates (previously would not traverse any reparse point) * nt.[l]stat() will only set S_IFLNK for symlinks (previous behaviour) * nt.readlink() will read destinations for symlinks and junction points only bpo-1311: os.path.exists('nul') now returns True on Windows * nt.stat('nul').st_mode is now S_IFCHR (previously was an error)
* bpo-9949: Enable symlink traversal for ntpath.realpath (GH-15287)Steve Dower2019-08-211-4/+1
|
* Remove unused imports in tests (GH-14518)Victor Stinner2019-07-011-1/+0
|
* bpo-37412: Fix test_os.test_getcwd_long_path() on macOS (GH-14452)Victor Stinner2019-06-281-2/+1
|
* bpo-37412: Fix os.getcwd() for long path on Windows (GH-14424)Victor Stinner2019-06-281-0/+55
| | | | * Fix test for integer overflow. * Add an unit test.
* bpo-37412: os.getcwdb() now uses UTF-8 on Windows (GH-14396)Victor Stinner2019-06-261-0/+11
| | | | | | | | | The os.getcwdb() function now uses the UTF-8 encoding on Windows, rather than the ANSI code page: see PEP 529 for the rationale. The function is no longer deprecated on Windows. os.getcwd() and os.getcwdb() now detect integer overflow on memory allocations. On Unix, these functions properly report MemoryError on memory allocation failure.
* bpo-37400: Fix test_os.test_chown() (GH-14374)Victor Stinner2019-06-251-11/+8
| | | | Use os.getgroups() rather than grp.getgrall() to get groups. Rename also the test to test_chown_gid().
* bpo-37267: Do not check for FILE_TYPE_CHAR in os.dup() on Windows (GH-14051)Zackery Spytz2019-06-171-0/+9
| | | | On Windows, os.dup() no longer creates an inheritable fd when handling a character file.
* bpo-26826: Expose copy_file_range in the os module (GH-7255)Pablo Galindo2019-05-311-0/+83
|
* bpo-37098: Skip memfd_create test before Linux 3.17 (GH-13677)Christian Heimes2019-05-301-0/+1
|
* bpo-26836: Add os.memfd_create() (#13567)Zackery Spytz2019-05-291-0/+16
| | | | | | | | | | | | | | | | | | | | * bpo-26836: Add os.memfd_create() * Use the glibc wrapper for memfd_create() Co-Authored-By: Christian Heimes <christian@python.org> * Fix deletions caused by autoreconf. * Use MFD_CLOEXEC as the default value for *flags*. * Add memset_s to configure.ac. * Revert memset_s changes. * Apply the requested changes. * Tweak the docs.
* bpo-31904: Add posix module support for VxWorks (GH-12118)pxinwr2019-05-211-1/+4
|
* bpo-35920: Windows 10 ARM32 platform support (GH-11774)Paul Monson2019-04-251-1/+2
|
* bpo-29734: Cleanup test_getfinalpathname_handles test (GH-12908)Berker Peksag2019-04-221-21/+14
|
* bpo-36234: Add more tests to PosixUidGidTests (GH-12234)Victor Stinner2019-03-111-8/+20
| | | | | | | | | | test_posix.PosixUidGidTests: * Add tests for invalid uid/gid type (str) * Add UID_OVERFLOW and GID_OVERFLOW constants to replace (1 << 32) Initial patch written by David Malcolm. Co-Authored-By: David Malcolm <dmalcolm@redhat.com>
* bpo-22831: Use "with" to avoid possible fd leaks in tests (part 2). (GH-10929)Serhiy Storchaka2019-03-051-3/+2
|
* Clean up code which checked presence of os.{stat,lstat,chmod} (#11643)Anthony Sottile2019-02-251-1/+0
|
* Fix syntax warnings in tests introduced in bpo-35942. (GH-11934)Serhiy Storchaka2019-02-191-12/+4
|
* bpo-35942: Improve the error message if __fspath__ returns invalid types in ↵Pablo Galindo2019-02-181-1/+18
| | | | | path_converter (GH-11831) The error message emitted when returning invalid types from __fspath__ in interfaces that allow passing PathLike objects has been improved and now it does explain the origin of the error.