summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
Commit message (Collapse)AuthorAgeFilesLines
...
* | | (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.
* | Fix #8879. Add os.link support to Windows.Brian Curtin2010-11-241-0/+28
| | | | | | | | | | | | | | | | Additionally, the st_ino attribute of stat structures was not being filled in. This was left out of the fix to #10027 and was noticed due to test_tarfile failing when applying the patch for this issue. An earlier version of the fix to #10027 included st_ino, but that attribute got lost in the shuffle of a few review/fix cycles. All tests pass.
* | #9424: Replace deprecated assert* methods in the Python test suite.Ezio Melotti2010-11-201-21/+21
| |
* | Close subprocess pipes in _kill. Fixes a number of ResourceWarnings.Brian Curtin2010-11-051-0/+3
| |
* | Fix #10257. Clear resource warnings by using os.popen's context manager.Brian Curtin2010-10-301-8/+10
| |
* | Issue #10210: os.get_exec_path() ignores BytesWarning warningsVictor Stinner2010-10-291-1/+4
| |
* | Fix #10098. Fix sporadic test_os failures.Brian Curtin2010-10-151-1/+1
| | | | | | | | | | Amaury noticed that we're not waiting for the subprocess to be ready -- it should be checking for 1, not 0.
* | Issue #9992: Remove PYTHONFSENCODING environment variable.Victor Stinner2010-10-131-30/+0
| |
* | Issue #9978: Wait until subprocess completes initialization. (Win32KillTests ↵Hirokazu Yamamoto2010-10-081-2/+14
| | | | | | | | in test_os)
* | LoginTests fails on a number of buildbots with different errors. SkipBrian Curtin2010-09-241-0/+3
| | | | | | | | it for now until a buildbot-safe solution comes up.
* | #9808. Implement os.getlogin for Windows, completed by Jon Anglin.Brian Curtin2010-09-231-0/+8
| | | | | | | | | | | | | | The test is semi-dumb, it just makes sure something comes back since we don't have a solid source to validate the returned login. We can't be 100% sure that the USERNAME env var will always match what os.getlogin() returns, so we don't make any specific assertion there.
* | Issue #9908: Fix os.stat() on bytes paths under Windows 7.Antoine Pitrou2010-09-211-2/+11
| |
* | Issue #8603: Environ.data is now protected -> Environ._dataVictor Stinner2010-09-101-1/+0
| | | | | | | | | | os.environ.data was a str dict in Python 3.1. In Python 3.2 on UNIX/BSD, os.environ.data is now a bytes dict: mark it as protected to avoid confusion.
* | #6394: Add os.getppid() support for Windows.Amaury Forgeot d'Arc2010-09-071-0/+12
| |
* | Workaround issue #8611 in test_undecodable_code() of test_sysVictor Stinner2010-08-201-9/+6
| | | | | | | | | | Write test.support.workaroundIssue8611() function so it will be easier to remove this workaround from all tests.
* | Skip test_encodings() of test_os on Windows and Mac OS XVictor Stinner2010-08-191-0/+2
| |
* | Fix os.get_exec_path() (code and tests) for python -bbVictor Stinner2010-08-191-3/+10
| | | | | | | | Catch BytesWarning exceptions.
* | Fix test_os: workaround #8611 bugVictor Stinner2010-08-191-2/+9
| |
* | Create os.fsdecode(): decode from the filesystem encoding with surrogateescapeVictor Stinner2010-08-191-15/+38
| | | | | | | | | | | | | | | | error handler, or strict error handler on Windows. * Rewrite os.fsencode() documentation * Improve os.fsencode and os.fsdecode() tests using the new PYTHONFSENCODING environment variable
* | Improve PEP 383 tests (in test_os)Victor Stinner2010-08-181-15/+41
| | | | | | | | | | | | | | | | | | | | | | * Use the current filesystem encoding instead of always using utf-8 * Enable the test on Mac OS X * Use TESTFN_UNENCODABLE and TESTFN_UNICODE instead of arbitrary filenames * To decode a filename, use strict error handler instead surrogateescape for mbcs encoding (on Windows) * Use TESTFN_UNENCODABLE (if available) for the directory name Skip the test if no non-ascii filename can be created.
* | Update test_os.py according to my last changes on _Environ.__repr__()Victor Stinner2010-07-291-1/+3
| |
* | Re-flow several long lines from #1578269.Brian Curtin2010-07-091-1/+2
| |
* | Implement #1578269. Patch by Jason R. Coombs.Brian Curtin2010-07-081-2/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added Windows support for os.symlink when run on Windows 6.0 or greater, aka Vista. Previous Windows versions will raise NotImplementedError when trying to symlink. Includes numerous test updates and additions to test_os, including a symlink_support module because of the fact that privilege escalation is required in order to run the tests to ensure that the user is able to create symlinks. By default, accounts do not have the required privilege, so the escalation code will have to be exposed later (or documented on how to do so). I'll be following up with that work next. Note that the tests use ctypes, which was agreed on during the PyCon language summit.
* | Merged revisions 82403 via svnmerge fromBenjamin Peterson2010-06-301-0/+1
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82403 | benjamin.peterson | 2010-06-30 12:11:08 -0500 (Wed, 30 Jun 2010) | 1 line mark test depending on ref counting ........
* | Merged revisions 81584 via svnmerge fromBrian Curtin2010-05-281-6/+50
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81584 | brian.curtin | 2010-05-28 10:49:21 -0500 (Fri, 28 May 2010) | 3 lines Fix #8405 for slow buildbots. Remove the sleep on startup and move the pipe communication into a loop to retry in case a buildbot gets even slower. ........
* | Issue #8513: os.get_exec_path() supports b'PATH' key and bytes value.Victor Stinner2010-05-181-11/+57
| | | | | | | | | | | | subprocess.Popen() and os._execvpe() support bytes program name. Add os.supports_bytes_environ flag: True if the native OS type of the environment is bytes (eg. False on Windows).
* | Oops, my patch on subprocess is not merged yet: fix my previous commit on ↵Victor Stinner2010-05-171-4/+1
| | | | | | | | test_os
* | test_os: cleanup test_internal_execvpe() and os._execvpe() mockupVictor Stinner2010-05-171-48/+53
| | | | | | | | | | | | | | | | | | * Replace os.defpath instead of os.get_exec_path() to test also os.get_exec_path() * Use contextlib.contextmanager, move the mockup outside the class, and the mockup returns directly the call list object * Use two different contexts for the two tests * Use more revelant values and names
* | Replace /s with os.sep in the new internal_execvpe test. Hopefully fixesGregory P. Smith2010-05-091-5/+8
| | | | | | | | this test on windows.
* | make condition more specificBenjamin Peterson2010-05-091-1/+2
| |
* | Write tests for the new function os.fsencode()Victor Stinner2010-05-091-1/+9
| |
* | Adds a unittest for the internal os._execvpe function.Gregory P. Smith2010-05-081-0/+49
| |
* | Fix test_os: os.environb doesn't exist on WindowsVictor Stinner2010-05-071-3/+5
| |
* | self.skip -> self.skipTestBenjamin Peterson2010-05-061-1/+1
| |
* | wrap long linesBenjamin Peterson2010-05-061-2/+5
| |
* | use concise skippingBenjamin Peterson2010-05-061-1/+1
| |
* | Issue #8603: Create a bytes version of os.environ for UnixVictor Stinner2010-05-061-0/+21
| | | | | | | | | | | | | | Create os.environb mapping and os.getenvb() function, os.unsetenv() encodes str argument to the file system encoding with the surrogateescape error handler (instead of utf8/strict) and accepts bytes, and posix.environ keys and values are bytes.
* | Issue #8485: PyUnicode_FSConverter() doesn't accept bytearray object anymore,Victor Stinner2010-04-221-9/+0
| | | | | | | | you have to convert your bytearray filenames to bytes