Commit Graph

9 Commits

Author SHA1 Message Date
Andrew M. Kuchling 310bad077b #1291: copy test_resource.py from the 2.6 trunk, to fix a test failure.
The 2.6 version also converts to unittest, but it seems to work fine under 2.5.
2008-02-23 21:32:06 +00:00
Nick Coghlan 0b5c17a9c3 Backport test_resource fix from trunk to stop it crashing on Ubuntu 2008-02-11 11:31:24 +00:00
Neal Norwitz 249cbe794e Try harder to provoke the exception since the ia64 buildbot still
doesn't reliably produce an exception.
2008-01-28 01:33:23 +00:00
Neal Norwitz 209ea39d31 Sync up with trunk. Try to flush repeatedly to ensure the exception is raised. 2008-01-27 20:08:04 +00:00
Neal Norwitz 6179234803 Backport 60342:
Try to prevent this test from being flaky.  We might need a sleep in here
which isn't as bad as it sounds.  The close() *should* raise an exception,
so if it didn't we should give more time to sync and really raise it.
2008-01-27 05:02:56 +00:00
Neal Norwitz b03528ca20 Backport 60334:
On some systems (e.g., Ubuntu on hppa) the flush()
doesn't (always) cause the exception, but the close() does.
2008-01-27 01:23:50 +00:00
Jason Tishler e4a070a320 Patch #551960: Add check for setrlimit() support
test_resource calls resource.setrlimit() to change the file size limits.
This fails on Cygwin, which supports setrlimit() and getrlimit(), just not
changing that particular setting. (The same would apply to any other
platform that has those functions but not that particular feature.)

Since getrlimit() works and setrlimit() can be used for other reasons, a
check for ValueError was added to that part of the test.
2002-12-12 18:13:36 +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
Jeremy Hylton 74ce77f0e6 Add tests for the recent resource module change.
Also add a test that Python doesn't die with SIGXFSZ if it exceeds the
file rlimit.  (Assuming this will also test the behavior when the 2GB
limit is exceed on a platform that doesn't have large file support.)
2002-04-23 20:21:22 +00:00