test suite.
For urllib2, move the import of gopherlib into the
only function that uses it: users (including the
test suite) certainly shouldn't see a deprecation
warning just because they import urllib2! If they
actually use gopher_open(), fine, _then_ they should
see a deprecation warning.
* Install the unittests, docs, newsitem, include file, and makefile update.
* Exercise the new functions whereever sets.py was being used.
Includes the docs for libfuncs.tex. Separate docs for the types are
forthcoming.
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.
getpwnam()/getpwuid() return consistent data.
Change test_grp to check that getgrall() and
getgrnam()/getgrgid() return consistent data.
Add error checks similar to test_pwd.py.
Port test___all__.py to PyUnit.
From SF patch #662807.
initializing GNU readline, setlocale(LC_CTYPE, "") is called, which
changes the <ctype.h> macros to use the "default" locale (which isn't
the *initial* locale -- the initial locale is the "C" locale in which
only ASCII characters are printable). When the default locale is e.g.
Latin-1, the repr() of string objects can include 8-bit characters
with the high bit set; I believe this is due to the recent
PRINT_MULTIBYTE_STRING changes to stringobject.c. This in turn screws
up test_pyexpat and test_rotor, which depend on the repr() of 8-bit
strings with high bit characters.
The solution (for now) is to force the LC_CTYPE locale to "C" after
importing rlcompleter. This is the locale required by the test suite
anyway.
imports of test modules now import from the test package. Other
related oddities are also fixed (like DeprecationWarning filters that
weren't specifying the full import part, etc.). Also did a general
code cleanup to remove all "from test.test_support import *"'s. Other
from...import *'s weren't changed.
starting the test suite proper. If _socket fails to build, that will
make this test fail with an ImportError -- handled by the test harness
as "no such module _socket" -- instead of an AttributeError deep in
CGIHTTPServer.
also modified check_all function to suppress all warnings since they aren't
relevant to what this test is doing (allows quiet checking of regsub, for
instance)
run first. Indirectly due to Skip adding check_all("pty") to test___all__:
that caused the expected ImportError due to pty.py trying to import the
non-existent FCNTL to get handled by test___all__, leaving a partial
module object for pty in sys.modules, which caused the later import of
pty via test_pty to succeed. Then test_tpy died with an AttributeError,
due to trying to access attributes of pty that didn't exist. regrtest
viewed that as a failure rather than the appropriate "test skipped".
Fixed by deleting partial module objects in test___all__ when test___all__
handles an ImportError.
no don't have to start with underscore.
- Add spaces after commas in argument lists.
- Only test dbhash if bsddb can be imported. (Wonder if there are
more like this?)
added test script and expected output file as well
this closes patch 103297.
__all__ attributes will be added to other modules without first submitting
a patch, just adding the necessary line to the test script to verify
more-or-less correct implementation.