summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
Commit message (Collapse)AuthorAgeFilesLines
* 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).
* | Properly close a file in test_os.Brett Cannon2011-03-151-8/+6
| |
* | #11515: Merge with 3.2.Ezio Melotti2011-03-151-2/+2
|\ \ | |/
| * #11515: Merge with 3.1.Ezio Melotti2011-03-151-2/+2
| |\
| | * #11515: fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-151-2/+2
| | |
| | * Merged revisions 87666 via svnmerge fromAmaury Forgeot d'Arc2011-01-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87666 | amaury.forgeotdarc | 2011-01-03 01:19:11 +0100 (lun., 03 janv. 2011) | 4 lines #8278: In the Windows implementation of stat() and utime(), use time_t instead of int. This gives support for dates after 2038, at least when compiled with VS2003 or later, where time_t is 64bit. ........
| | * Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
| | * Merged revisions 85987 via svnmerge fromBrian Curtin2010-10-301-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85987 | brian.curtin | 2010-10-30 16:24:21 -0500 (Sat, 30 Oct 2010) | 2 lines Fix #10257. Clear resource warnings by using os.popen's context manager. ........
| | * Merged revisions 80108,80111,80114-80115 via svnmerge fromMark Dickinson2010-04-161-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r80108 | victor.stinner | 2010-04-16 13:23:43 +0100 (Fri, 16 Apr 2010) | 4 lines Add CS_GNU_LIBC_VERSION and CS_GNU_LIBPTHREAD_VERSION constants for constr(), and disable test_execvpe_with_bad_program() of test_os if the libc uses linuxthreads to avoid the "unknown signal 32" bug (see issue #4970). ........ r80111 | mark.dickinson | 2010-04-16 13:47:52 +0100 (Fri, 16 Apr 2010) | 1 line Keep confstr entries in alphabetical order. ........ r80114 | mark.dickinson | 2010-04-16 14:45:35 +0100 (Fri, 16 Apr 2010) | 1 line Issue #4970: move linuxthreads check outside the affected test, and use skipIf ........ r80115 | mark.dickinson | 2010-04-16 14:51:27 +0100 (Fri, 16 Apr 2010) | 1 line Don't assume that os.confstr_names exists. ........
| | * Merged revisions 78739 via svnmerge fromv3.1.2rc1Benjamin Peterson2010-03-061-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r78739 | benjamin.peterson | 2010-03-06 14:34:24 -0600 (Sat, 06 Mar 2010) | 10 lines Merged revisions 78718 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78718 | gregory.p.smith | 2010-03-06 01:35:19 -0600 (Sat, 06 Mar 2010) | 3 lines Call setreuid and setregid in a subprocess to avoid altering the test runner's process state. Should fix issue8045. ........ ................
| | * Merged revisions 78548 via svnmerge fromGregory P. Smith2010-03-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r78548 | gregory.p.smith | 2010-02-28 21:54:14 -0800 (Sun, 28 Feb 2010) | 10 lines Merged revisions 78546 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78546 | gregory.p.smith | 2010-02-28 21:43:43 -0800 (Sun, 28 Feb 2010) | 3 lines Fixes issue #7999: os.setreuid() and os.setregid() would refuse to accept a -1 parameter on some platforms such as OS X. ........ ................
| | * Merged revisions 78316 via svnmerge fromEzio Melotti2010-02-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r78316 | ezio.melotti | 2010-02-22 17:59:01 +0200 (Mon, 22 Feb 2010) | 1 line #7310: fix the repr() of os.environ ........
| | * Merged revisions 77571 via svnmerge fromAntoine Pitrou2010-01-171-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r77571 | antoine.pitrou | 2010-01-17 13:16:23 +0100 (dim., 17 janv. 2010) | 4 lines Issue #7561: Fix crashes when using bytearray objects with the posix module. ........
| | * Merged revisions 73715 via svnmerge fromGeorg Brandl2009-08-131-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://svn.python.org/python/branches/py3k ........ r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line convert old fail* assertions to assert* ........
| | * Merged revisions 74171 via svnmerge fromR. David Murray2009-07-221-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r74171 | r.david.murray | 2009-07-22 11:20:27 -0400 (Wed, 22 Jul 2009) | 3 lines Issue 6542: Make sure that TestInvalidFD.test_closerange does not close any valid file descriptors. ........
* | | Issue 11348: skip os.setpriority() test if current nice level is >= 19.Giampaolo Rodolà2011-02-281-1/+7
| | |
* | | Make sendfile tests more robustAntoine Pitrou2011-02-261-1/+6
| | |
* | | Issue #11323: fix sendfile tests under 64-bit Solaris.Antoine Pitrou2011-02-261-9/+16
| | |
* | | Fix AttributeError.Antoine Pitrou2011-02-261-1/+1
| | |
* | | (issue 11323) - attempt to fix solaris buildbot failure for os.sendfile(). ↵Giampaolo Rodolà2011-02-251-2/+3
| | | | | | | | | | | | Also fixed an AttributeError in get/set priority tests.
* | | Issue 10784: adds os.getpriority() and os.setpriority() functions.Giampaolo Rodolà2011-02-251-0/+19
| | |
* | | Skip os.sendfile() test if threading module is not available.Giampaolo Rodolà2011-02-251-0/+1
| | |
* | | Issue 10882: add os.sendfile(). (patch provided by Ross Lagerwall)Giampaolo Rodolà2011-02-251-0/+253
|/ /
* | #8278: In the Windows implementation of stat() and utime(),Amaury Forgeot d'Arc2011-01-031-0/+5
| | | | | | | | | | use time_t instead of int. This gives support for dates after 2038, at least when compiled with VS2003 or later, where time_t is 64bit.
* | Fix #9333. The symlink function is always available now, raising OSErrorBrian Curtin2010-12-281-3/+3
| | | | | | | | when the user doesn't hold the symbolic link privilege rather than hiding it.
* | Avoid possible zombi process.Hirokazu Yamamoto2010-12-051-2/+4
| |
* | Fix #9333. Expose os.symlink on Windows only when usable.Brian Curtin2010-12-021-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to create symlinks on Windows, SeCreateSymbolicLinkPrivilege is an account privilege that is required to be held by the user. Not only must the privilege be enabled for the account, the activated privileges for the currently running application must be adjusted to enable the requested privilege. Rather than exposing an additional function to be called prior to the user's first os.symlink call, we handle the AdjustTokenPrivileges Windows API call internally and only expose os.symlink when the privilege escalation was successful. Due to the change of only exposing os.symlink when it's available, we can go back to the original test skipping methods of checking via `hasattr`.
* | Issue 9299 Add exist_ok parameter to os.makedirs to suppress 'File exists' ↵Terry Reedy2010-12-021-0/+22
| | | | | | | | exception. Patch by Ray Allen.
* | Fix #10591. Fix test_os for refleak runs.Brian Curtin2010-11-301-2/+1
| | | | | | | | Split a common setUp/tearDown into the appropriate parts.
* | Actually fix what I attempted to fix in r86888...Brian Curtin2010-11-301-3/+3
| |
* | Try to fix failures on platforms that can't encode the test characters.Brian Curtin2010-11-301-1/+6
| | | | | | | | Skip the test if encoding fails.
* | Fix for #8879.Brian Curtin2010-11-281-0/+5
| | | | | | | | | | | | | | Amaury noticed that this was originally written in a way that would fail on names that can't be encoded with the mbcs codec. Restructured the function to work with wide names first then narrow names second, to fall in line with the way other functions are written in posixmodule.c.