Commit Graph

22 Commits

Author SHA1 Message Date
R. David Murray 3db8a3432b Change more tests to use import_module for the modules that
should cause tests to be skipped.  Also rename import_function
to the more descriptive get_attribute and add a docstring.
2009-03-30 23:05:48 +00:00
R. David Murray 59beec326a Add import_function method to test.test_support, and modify a number of
tests that expect to be skipped if imports fail or functions don't
exist to use import_function and import_module.  The ultimate goal is
to change regrtest to not skip automatically on ImportError.  Checking
in now to make sure the buldbots don't show any errors on platforms
I can't direct test on.
2009-03-30 19:04:00 +00:00
R. David Murray 5cb104d1b9 Revert incorrect change. 2009-03-30 15:30:34 +00:00
R. David Murray ad74dfe8ff Convert import try/except to use test_support.import_module(). 2009-03-30 15:14:01 +00:00
Benjamin Peterson 3c87e2289d add missing import 2009-03-30 14:42:23 +00:00
Benjamin Peterson bec087f29d fix incorrect auto-translation of TestSkipped -> unittest.SkipTest 2009-03-26 21:10:30 +00:00
Benjamin Peterson 888a39b54c remove test_support.TestSkipped and just use unittest.SkipTest 2009-03-26 20:48:25 +00:00
Neal Norwitz 84bc19a453 Restore rev 47014:
The hppa ubuntu box sometimes hangs forever in these tests.  My guess
is that the wait is failing for some reason.  Use WNOHANG, so we won't
wait until the buildbot kills the test suite.

I haven't been able to reproduce the failure, so I'm not sure if
this will help or not.  Hopefully, this change will cause the test
to fail, rather than hang.  That will be better since we will get
the rest of the test results.  It may also help us debug the real problem.

*** The reason this originally failed was because there were many
zombie children outstanding before rev 47158 cleaned them up.
There are still hangs in test_subprocess that need to be addressed,
but that will take more work.  This should close some holes.
2006-07-07 06:03:15 +00:00
Neal Norwitz b15ac3169d Add new utility function, reap_children(), to test_support. This should
be called at the end of each test that spawns children (perhaps it
should be called from regrtest instead?).  This will hopefully prevent
some of the unexplained failures in the buildbots (hppa and alpha)
during tests that spawn children.  The problems were not reproducible.
There were many zombies that remained at the end of several tests.
In the worst case, this shouldn't cause any more problems,
though it may not help either.  Time will tell.
2006-06-29 04:10:08 +00:00
Neal Norwitz 0f51cf6e04 Revert 47014 until it is more robust 2006-06-18 20:10:24 +00:00
Neal Norwitz 10b835c401 The hppa ubuntu box sometimes hangs forever in these tests. My guess
is that the wait is failing for some reason.  Use WNOHANG, so we won't
wait until the buildbot kills the test suite.

I haven't been able to reproduce the failure, so I'm not sure if
this will help or not.  Hopefully, this change will cause the test
to fail, rather than hang.  That will be better since we will get
the rest of the test results.  It may also help us debug the real problem.
2006-06-18 19:37:40 +00:00
Neal Norwitz 05a45599d7 Patch #1309579: wait3 and wait4 were added to the posix module by Chad J. Schroeder.
This was a fair amount of rework of the patch.  Refactored test_fork1 so it
could be reused by the new tests for wait3/4.  Also made them into new style
unittests (derive from unittest.TestCase).
2006-03-20 06:30:08 +00:00
Barry Warsaw b5da606dfd Oops, missed an import of test_support. 2002-07-23 19:23:22 +00:00
Guido van Rossum 2242f2fbd0 Unixware 7 support by Billy G. Allie (SF patch 413011) 2001-04-11 20:58:20 +00:00
Moshe Zadka fc3fc337d0 Checking in patch #103478 -- makes popen2 and fork1 tested on BeOS.
Tested for not breaking builds on Linux.
2001-01-30 18:35:32 +00:00
Marc-André Lemburg 3661908a6a This patch removes all uses of "assert" in the regression test suite
and replaces them with a new API verify(). As a result the regression
suite will also perform its tests in optimization mode.

Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
2001-01-17 19:11:13 +00:00
Fred Drake 56221a7cfa Chris Herborth <chrish@pobox.com>:
Minor updates for BeOS R5.

Use of OSError in test.test_fork1 changed to TestSkipped, with corresponding
change in BeOS/README (by Fred).

This closes SourceForge patch #100978.
2000-08-15 18:52:33 +00:00
Thomas Wouters b9fa0a843e Raise 'TestSkipped' (from the test_support) module rather than 'ImportError'
to signify a test that should be marked as 'skipped' rather than 'failed'.
Also 'document' it, in README.
2000-08-04 13:34:43 +00:00
Guido van Rossum 4951782178 Raise ImportError when os.fork does not exist. 2000-05-04 00:36:42 +00:00
Guido van Rossum c1488413e4 Added a provision to stop all threads before exiting from the test:
the change to regrtest.py to unload all newly imported modules did
something bad to the threads -- and I realized that they would never
stop!
2000-04-24 14:07:03 +00:00
Fred Drake 1a4b593dd6 Use a constant to specify the number of child threads to create.
Instead of assuming that the number process ids of the threads is the
same as the process id of the controlling process, use a copy of the
dictionary and check for changes in the process ids of the threads
from the thread's process ids in the parent process.  This makes the
test make more sense on systems which assign a new pid to each thread
(i.e., Linux).

This doesn't fix the other problems evident with this test on Linux.
2000-04-10 15:36:39 +00:00
Guido van Rossum f7221c3a7d Test case for fork1() behavior.
Only the main thread should survive in the child after a fork().
2000-02-25 19:25:05 +00:00