summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
Commit message (Collapse)AuthorAgeFilesLines
* update skip reasonPhilip Jenvey2012-03-011-1/+1
|
* also skip test_device_encoding when stdin isn't a ttyPhilip Jenvey2012-03-011-2/+2
|
* Issue #14153 Create _Py_device_encoding() to prevent _io from having to importBrett Cannon2012-02-291-0/+19
| | | | the os module.
* Merge 3.2: Issue #13703 plus some related test suite fixes.Georg Brandl2012-02-201-8/+28
|\
| * Merge from 3.1: Issue #13703: add a way to randomize the hash values of ↵Georg Brandl2012-02-201-8/+28
| |\ | | | | | | | | | | | | | | | | | | | | | | | | basic types (str, bytes, datetime) in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated. The environment variable PYTHONHASHSEED and the new command line flag -R control this behavior.
| | * Issue #13703: add a way to randomize the hash values of basic types (str, ↵Georg Brandl2012-02-201-8/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | bytes, datetime) in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated. The environment variable PYTHONHASHSEED and the new command line flag -R control this behavior.
* | | get_terminal_size() can also fail with ENOTTY if the fd is not connected to ↵Antoine Pitrou2012-02-081-2/+9
| | | | | | | | | | | | a terminal.
* | | Relax tests to fix buildbot failureAntoine Pitrou2012-02-081-2/+2
| | |
* | | Issue #13609: Add two functions to query the terminal size:Antoine Pitrou2012-02-081-0/+38
| | | | | | | | | | | | | | | os.get_terminal_size (low level) and shutil.get_terminal_size (high level). Patch by Zbigniew Jędrzejewski-Szmek.
* | | Backout f8409b3d6449: the PEP 410 is not accepted yetVictor Stinner2012-02-081-31/+0
| | |
* | | PEP 410Victor Stinner2012-02-081-0/+31
| | |
* | | Issue #13964: Skip os.*utime*() tests if os.stat() doesn't support timestampVictor Stinner2012-02-081-0/+11
| | | | | | | | | | | | with a subsecond resolution
* | | Issue #13964: Split os.*utime*() subsecond tests into multiple tests to helpVictor Stinner2012-02-081-38/+75
| | | | | | | | | | | | debugging
* | | Issue #13964: Test also os.futimesat()Victor Stinner2012-02-081-1/+8
| | |
* | | Issue #13964: Write tests for new os.*utime*() functionsVictor Stinner2012-02-081-0/+37
| | |
* | | Following Nick's suggestion, rename posix.fdlistdir() to posix.flistdir(), toCharles-François Natali2012-02-061-2/+2
| | | | | | | | | | | | | | | be consistent with other functions accepting file descriptors (fdlistdir() was added in 3.3, so hasn't been released yet).
* | | Issue #13734: Add os.fwalk(), a directory walking function yielding fileCharles-François Natali2012-02-051-2/+58
| | | | | | | | | | | | descriptors.
* | | Issue #8828: Add new function os.replace(), for cross-platform renaming with ↵Antoine Pitrou2012-01-301-0/+12
| | | | | | | | | | | | overwriting.
* | | Issue #13772: In os.symlink() under Windows, do not try to guess the linkAntoine Pitrou2012-01-241-2/+7
|\ \ \ | |/ / | | | | | | | | | target's type (file or directory). The detection was buggy and made the call non-atomic (therefore prone to race conditions).
| * | Issue #13772: In os.symlink() under Windows, do not try to guess the linkAntoine Pitrou2012-01-241-2/+7
| | | | | | | | | | | | | | | target's type (file or directory). The detection was buggy and made the call non-atomic (therefore prone to race conditions).
| * | Issue #13415: Skip test_os.test_unset_error on FreeBSD and OS X.Charles-François Natali2011-11-271-0/+4
| | |
* | | Issue #13415: Skip test_os.test_unset_error on FreeBSD < 7 and OS X < 10.6Charles-François Natali2011-11-261-0/+4
| | | | | | | | | | | | (where unsetenv() doesn't return a value).
* | | (Merge 3.2) Issue #13436: Fix unsetenv() test on WindowsVictor Stinner2011-11-221-1/+2
|\ \ \ | |/ /
| * | Issue #13436: Fix unsetenv() test on WindowsVictor Stinner2011-11-221-1/+2
| | |
* | | (Merge 3.2) Issue #13415: os.unsetenv() doesn't ignore errors anymore.Victor Stinner2011-11-221-0/+9
|\ \ \ | |/ /
| * | Issue #13415: os.unsetenv() doesn't ignore errors anymore.Victor Stinner2011-11-221-0/+9
| | |
* | | Issue #13374: Deprecate os.getcwdb() on WindowsVictor Stinner2011-11-161-0/+1
| | |
* | | Issue #13374: Skip deprecation tests for os.symlink() on Windows XPVictor Stinner2011-11-151-1/+8
| | | | | | | | | | | | To avoid a NotImplementedError('CreateSymbolicLinkW not found') error.
* | | Issue #13374: The Windows bytes API has been deprecated in the os module. UseVictor Stinner2011-11-151-4/+40
| | | | | | | | | | | | | | | Unicode filenames instead of bytes filenames to not depend on the ANSI code page anymore and to support any filename.
* | | Oops. Update a placeholder comment with the issue number.Brian Curtin2011-11-061-1/+1
| | |
* | | Fix #13327. Remove the need for an explicit None as the second argument toBrian Curtin2011-11-061-0/+15
| | | | | | | | | | | | | | | os.utime in order to update to the current time. The second argument is now optional.
* | | Close #13174: Fix extended attributes tests in test_os for SELinuxVictor Stinner2011-10-161-5/+10
| | | | | | | | | | | | On Fedora, new files get the 'security.selinux' attribute.
* | | expose linux extended file system attributes (closes #12720)Benjamin Peterson2011-09-011-0/+94
| | |
* | | test_os needs to reap threadsAntoine Pitrou2011-07-151-0/+1
| | |
* | | (merge 3.2) test_os: remove now useless TemporaryFileTests testcaseVictor Stinner2011-07-011-111/+6
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | TemporaryFileTests has tests for os.tempnam() and os.tmpfile(), functions removed from Python 3. Move fdopen() tests to the FileTests testcase to test fdopen() on a file descriptor, not on a directory descriptor (which raises an error on Windows).
| * | test_os: remove now useless TemporaryFileTests testcaseVictor Stinner2011-07-011-111/+6
| | | | | | | | | | | | | | | | | | | | | | | | TemporaryFileTests has tests for os.tempnam() and os.tmpfile(), functions removed from Python 3. Move fdopen() tests to the FileTests testcase to test fdopen() on a file descriptor, not on a directory descriptor (which raises an error on Windows).
* | | (merge 3.2) test_os: add TemporaryFileTests to the testcase listVictor Stinner2011-07-011-0/+1
|\ \ \ | |/ / | | | | | | The testcase was never executed, it's now fixed.
| * | test_os: add TemporaryFileTests to the testcase listVictor Stinner2011-07-011-0/+1
| | | | | | | | | | | | The testcase was never executed, it's now fixed.
* | | Issue #12451: Add support.create_empty_file()Victor Stinner2011-06-301-2/+1
| | | | | | | | | | | | | | | | | | | | | We don't need to create a temporary buffered binary or text file object just to create an empty file. Replace also os.fdopen(handle).close() by os.close(handle).
* | | (merge 3.2) Issue #12451: Open files in binary mode in some tests when the textVictor Stinner2011-06-301-7/+6
|\ \ \ | |/ / | | | | | | | | | | | | file is not needed. Remove also an unused variable (blank) in test_threading.
| * | Issue #12451: Open files in binary mode in some tests when the text file is notVictor Stinner2011-06-301-7/+6
| | | | | | | | | | | | | | | | | | needed. Remove also an unused variable (blank) in test_threading.
* | | Issue #12400: oops, remove debug code...Victor Stinner2011-06-291-1/+0
| | |
* | | (merge 3.2) Issue #12400: regrtest -W doesn't rerun the tests twice anymore,Victor Stinner2011-06-291-0/+1
|\ \ \ | |/ / | | | | | | | | | but captures the output and displays it on failure instead. regrtest -v doesn't print the error twice anymore if there is only one error.
* | | Merge from 3.2 for Issue #12084.Brian Curtin2011-06-131-0/+45
|\ \ \ | |/ /
| * | Fix #12084. os.stat on Windows wasn't working properly with relative symlinks.Brian Curtin2011-06-131-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use of DeviceIoControl to obtain the symlink path via the reparse tag was removed. The code now uses GetFinalPathNameByHandle in the case of a symbolic link and works properly given the added test which creates a symbolic link and calls os.stat on it from multiple locations. Victor Stinner also noticed an issue with os.lstat following the os.stat code path when being passed bytes. The posix_lstat function was adjusted to properly hook up win32_lstat instead of the previous STAT macro (win32_stat).
* | | os.sendfile() test: fix "AttributeError: 'NoneType' object has no attribute ↵Giampaolo Rodola'2011-05-181-73/+74
| | | | | | | | | | | | | | | | | | 'Thread'" when running tests with --without-threads option. reference: http://bugs.python.org/issue10882#msg136257
* | | Issue #11223: Replace threading._info() by sys.thread_infoVictor Stinner2011-04-301-9/+4
| | |
* | | Issue #11223: Add threading._info() function providing informations about theVictor Stinner2011-04-191-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | thread implementation. Skip test_lock_acquire_interruption() and test_rlock_acquire_interruption() of test_threadsignals if a thread lock is implemented using a POSIX mutex and a POSIX condition variable. A POSIX condition variable cannot be interrupted by a signal (e.g. on Linux, the futex system call is restarted).
* | | (merge) Issue #11395: io.FileIO().write() clamps the data length to 32,767Victor Stinner2011-03-201-0/+19
|\ \ \ | |/ / | | | | | | | | | | | | | | | bytes on Windows if the file is a TTY to workaround a Windows bug. The Windows console returns an error (12: not enough space error) on writing into stdout if stdout mode is binary and the length is greater than 66,000 bytes (or less, depending on heap usage).
| * | Issue #11395: io.FileIO().write() clamps the data length to 32,767 bytes onVictor Stinner2011-03-201-0/+19
| | | | | | | | | | | | | | | | | | | | | Windows if the file is a TTY to workaround a Windows bug. The Windows console returns an error (12: not enough space error) on writing into stdout if stdout mode is binary and the length is greater than 66,000 bytes (or less, depending on heap usage).