Martin v. Löwis
d2bbe526c3
Patch #2232 : os.tmpfile might fail on Windows if the user has no
...
permission to create files in the root directory.
Will backport to 2.5.
2008-03-06 06:55:22 +00:00
Georg Brandl
309501a617
#1663329 : add os.closerange() to close a range of fds,
...
ignoring errors, and use this in subprocess to speed up
subprocess creation in close_fds mode. Patch by Mike Klaas.
2008-01-19 20:22:13 +00:00
Martin v. Löwis
7dcb83cdc5
Bug #1709599 : Run test_1565150 only if the file system is NTFS.
2007-08-30 19:04:09 +00:00
Neal Norwitz
0d4c06e06e
Whitespace normalization. Ugh, we really need to do this more often.
...
You might want to review this change as it's my first time. Be gentle. :-)
2007-04-25 06:30:05 +00:00
Žiga Seilnacht
18ffe42b4b
Fix WalkTests.test_traversal() on Windows. The cleanup in
...
MakedirTests.setUp() can now be removed.
2007-04-04 18:38:47 +00:00
Martin v. Löwis
3bf573f918
Bug #1686475 : Support stat'ing open files on Windows again.
...
Will backport to 2.5.
2007-04-04 18:30:36 +00:00
Collin Winter
1520fe4e58
Shut up an occaisonal buildbot error due to test files being left around.
2007-03-31 19:31:34 +00:00
Georg Brandl
cae9f3d916
New test for rev. 54407 which only uses directories under TESTFN.
2007-03-21 09:10:29 +00:00
Neal Norwitz
c990f6454f
Try backing out 54407 to see if it corrects the problems on the Windows
...
buildbots. This rev was backported, so we will need to keep both branches
in sync, pending the outcome of the test after this checkin.
2007-03-20 05:23:09 +00:00
Georg Brandl
8844e438b1
Patch #1273829 : os.walk() now has a "followlinks" parameter. If set to
...
True (which is not the default), it visits symlinks pointing to
directories.
2007-03-16 08:22:40 +00:00
Martin v. Löwis
a97e06d9db
Round to int, because some systems support sub-second time stamps in stat, but not in utime.
...
Also be consistent with modifying only mtime, not atime.
2006-10-15 11:02:07 +00:00
Martin v. Löwis
cfcd3a9569
Loosen the test for equal time stamps.
2006-10-15 09:35:51 +00:00
Martin v. Löwis
18aaa568fd
Patch #1576166 : Support os.utime for directories on Windows NT+.
2006-10-15 08:43:33 +00:00
Martin v. Löwis
f43893a878
Bug #1565150 : Fix subsecond processing for os.utime on Windows.
2006-10-09 20:44:25 +00:00
Tim Peters
16a3932774
Whitespace normalization.
2006-07-03 08:23:19 +00:00
Martin v. Löwis
ee1e06d497
Correct arithmetic in access on Win32. Fixes #1513646 .
2006-07-02 18:44:00 +00:00
Martin v. Löwis
d4e3bb3d39
Port access, chmod, parts of getcwdu, mkdir, and utime to direct Win32 API.
2006-05-06 16:32:54 +00:00
Martin v. Löwis
8e0d494e41
Implement os.{chdir,rename,rmdir,remove} using Win32 directly.
2006-05-04 10:08:42 +00:00
Martin v. Löwis
5510f65f5a
Avoid using items() in environ.update(). Fixes #1124513 .
...
Will backport to 2.4.
2005-02-17 21:23:20 +00:00
Martin v. Löwis
1d11de6dbd
Revert os.py 1.75, and directly implement update.
...
Fixes #1110478 and #1100235 .
2005-01-29 13:29:23 +00:00
Martin v. Löwis
4d394dfebb
Truncate st_?time before comparing it with ST_?TIME in the tests.
2005-01-23 09:19:22 +00:00
Tim Peters
45e77c55ff
Whitespace normalization.
2004-08-29 18:47:31 +00:00
Martin v. Löwis
dc3883f671
Patch #934711 : Expose platform-specific entropy.
2004-08-29 15:46:35 +00:00
Tim Peters
4182cfd7db
test_devnull(): Use assertEqual() instead of an assert stmt.
2004-06-08 20:34:34 +00:00
Martin v. Löwis
bdec50f027
Feature request #935915 : Add os.path.devnull.
2004-06-08 08:29:33 +00:00
Walter Dörwald
118f931d07
Rename class attribute containing the class to be tested, so the name is the
...
same as for the string and sequence tests.
2004-06-02 18:42:25 +00:00
Walter Dörwald
0a6d0ff8d9
Port the dictionary tests from test_types.py to unittest. Collect as much
...
mapping tests as possible in mapping_test.py and reuse the tests in
test_dict.py, test_userdict.py, test_weakref.py, test_os.py and test_shelve.py.
From SF patch #736962 .
2004-05-31 16:29:04 +00:00
Tim Peters
58eb11cf62
Whitespace normalization.
2004-01-18 20:29:55 +00:00
Andrew M. Kuchling
b386f6a509
As part of fixing bug #829532 , add a test case that exercises os.makedirs
2003-12-23 16:36:11 +00:00
Walter Dörwald
f0dfc7ac5c
Fix a bunch of typos in documentation, docstrings and comments.
...
(From SF patch #810751 )
2003-10-20 14:01:56 +00:00
Walter Dörwald
21d3a32b99
Combine the functionality of test_support.run_unittest()
...
and test_support.run_classtests() into run_unittest()
and use it wherever possible.
Also don't use "from test.test_support import ...", but
"from test import test_support" in a few spots.
From SF patch #662807 .
2003-05-01 17:45:56 +00:00
Tim Peters
5501b5e3d7
SF bug 728097: tmpnam problems on windows 2.3b, breaks test.test_os.
...
tmpnam() appears essentially useless on Windows, and it finally broke
the test for Irmen de Jong. Read the long new comment in test_tmpnam()
for details. Since the MS implementation is insane, it might be good
if we supplied a different implementation.
Bugfix candidate.
2003-04-28 03:13:03 +00:00
Raymond Hettinger
9dcbbea878
Factor out common boilerplate for test_support
2003-04-27 07:54:23 +00:00
Tim Peters
c4e0940042
New generator os.walk() does a bit more than os.path.walk() does, and
...
seems much easier to use. Code, docs, NEWS, and additions to test_os.py
(testing this sucker is a bitch!).
2003-04-25 07:11:48 +00:00
Raymond Hettinger
2c2d322884
SF patch #667730 : More DictMixin
...
* Adds missing pop() methods to weakref.py
* Expands test suite to broaden coverage of objects with
a mapping interface.
Contributed by Sebastien Keim.
2003-03-09 07:05:43 +00:00
Guido van Rossum
2e8bba5c21
Standardize behavior: create a single suite merging all test cases.
2002-08-22 19:40:33 +00:00
Barry Warsaw
04f357cffe
Get rid of relative imports in all unittests. Now anything that
...
imports e.g. test_support must do so using an absolute package name
such as "import test.test_support" or "from test import test_support".
This also updates the README in Lib/test, and gets rid of the
duplicate data dirctory in Lib/test/data (replaced by
Lib/email/test/data).
Now Tim and Jack can have at it. :)
2002-07-23 19:04:11 +00:00
Martin v. Löwis
f90ae20354
Patch #488073 : AtheOS port.
2002-06-11 06:22:31 +00:00
Tim Peters
d392506c43
Tighten up some warning filters, and break some dependencies on the
...
order in which the tests are normally run.
2002-04-16 01:27:44 +00:00
Tim Peters
e0c446bb4a
Whitespace normalization.
2001-10-18 21:57:37 +00:00
Guido van Rossum
1fff878c45
The assignment to result.st_rdev can raise AttributeError as well as
...
TypeError (on systems where it's not defined at all, it raises
AttributeError; when it's defined, assignment to it raises TypeError).
2001-10-18 21:19:31 +00:00
Guido van Rossum
98bf58f1c6
SF patch #462296 : Add attributes to os.stat results; by Nick Mathewson.
...
This is a big one, touching lots of files. Some of the platforms
aren't tested yet. Briefly, this changes the return value of the
os/posix functions stat(), fstat(), statvfs(), fstatvfs(), and the
time functions localtime(), gmtime(), and strptime() from tuples into
pseudo-sequences. When accessed as a sequence, they behave exactly as
before. But they also have attributes like st_mtime or tm_year. The
stat return value, moreover, has a few platform-specific attributes
that are not available through the sequence interface (because
everybody expects the sequence to have a fixed length, these couldn't
be added there). If your platform's struct stat doesn't define
st_blksize, st_blocks or st_rdev, they won't be accessible from Python
either.
(Still missing is a documentation update.)
2001-10-18 20:34:25 +00:00
Fred Drake
2e2be3760c
Change the PyUnit-based tests to use the test_main() approach. This
...
allows using the tests with unittest.py as a script. The tests will
still run when run as a script themselves.
2001-09-20 21:33:42 +00:00
Barry Warsaw
60f018846d
Merge changes from r22a2-branch back into trunk. Also, change patch
...
level to 2.2a2+
2001-08-22 19:24:42 +00:00
Jeremy Hylton
a7fc21baf6
Silence warnings during test_os
2001-08-20 20:10:01 +00:00
Tim Peters
87cc0c329e
Whitespace normalization, plus:
...
+ test_quopri.py relied on significant trailing spaces. Fixed.
+ test_dircache.py (still) doesn't work on Windows (directory mtime on
Windows doesn't work like it does on Unix).
2001-07-21 01:41:30 +00:00
Fred Drake
1f4cc897f8
Remove a couple of lines from the test that proved not to be portable to
...
all platforms that offer tempnam().
2001-07-17 21:56:01 +00:00
Fred Drake
38c2ef0a4c
Start of a test suite for the "os" module -- this only tests the temporary
...
file management functions that have just been made available on more
platforms.
2001-07-17 20:52:51 +00:00