Commit graph

13 commits

Author SHA1 Message Date
Collin Winter
c2898c5a67 Standardize on test.test_support.run_unittest() (as opposed to a mix of run_unittest() and run_suite()). Also, add functionality to run_unittest() that admits usage of unittest.TestLoader.loadTestsFromModule(). 2007-04-25 17:29:52 +00:00
Brett Cannon
27ef61ca18 Change the docs to no longer claim that unittest is preferred over doctest for
regression tests.
2007-03-25 01:32:36 +00:00
Brett Cannon
a30fcb4dae Introduce test.test_support.TransientResource. It's a context manager to
surround calls to resources that may or may not be available.  Specifying the
expected exception and attributes to be raised if the resource is not available
prevents overly broad catching of exceptions.

This is meant to help suppress spurious failures by raising
test.test_support.ResourceDenied if the exception matches.  It would probably
be good to go through the various network tests and surround the calls to catch
connection timeouts (as done with test_socket_ssl in this commit).
2007-03-08 23:58:11 +00:00
Brett Cannon
78a132b814 Fix error where the end of a funcdesc environment was accidentally moved too
far down.
2007-01-12 07:27:52 +00:00
Brett Cannon
92d54d5e9c Add EnvironmentVarGuard to test.test_support. Provides a context manager to
temporarily set or unset environment variables.
2007-01-04 00:23:49 +00:00
George Yoshida
7366fcecdf Note that guard_warnings_filter was added in 2.6 2006-12-14 02:22:44 +00:00
Brett Cannon
6d9520c4f0 Add test.test_support.guard_warnings_filter . This function returns a context
manager that protects warnings.filter from being modified once the context is
exited.
2006-12-13 23:09:53 +00:00
Brett Cannon
c8aa848ece Have test_mkalias_relative check that sys.prefix already exists; otherwise test
is pointless.

Also add a note to the docs for the 'test' package that test cases should check
first that any conditions needed in the operating system are met before having
a test run.

Closes bug #1077302.  THanks, Ian Holsman.
2004-12-06 06:08:59 +00:00
Brett Cannon
d1de45f549 Fix capitalization of title for subsection 2. 2004-03-18 07:37:15 +00:00
Fred Drake
60e868abd2 - reorganize sections
- correct section level error (module references are always \section)
- many markup revisions, including some minor rewordings
2003-09-06 17:51:16 +00:00
Raymond Hettinger
951976dc9f SF bug #801486: Markup error. 2003-09-06 04:39:54 +00:00
Fred Drake
9f545c489a Make this format again. 2003-05-09 19:10:12 +00:00
Brett Cannon
066f3928b2 Library documentation for the 'test' package. Still needs to be checked by Fred. 2003-05-07 22:02:17 +00:00