Commit Graph

795 Commits

Author SHA1 Message Date
Fredrik Lundh 06d126803c Move uchhash functionality into unicodedata (after the recent
crop of changes, the files are small enough to do this).  Also
adds "name" and "lookup" functions to unicodedata.
2001-01-24 07:59:11 +00:00
Skip Montanaro 17ab123cf1 a few more modules get __all__ 2001-01-24 06:27:27 +00:00
Barry Warsaw 24f3acab3b It's "gopherlib" not "gopher". 2001-01-24 04:13:02 +00:00
Skip Montanaro 2dd4276559 added a few more __all__ lists
fixed typo in ihooks docstring
2001-01-23 15:35:05 +00:00
Tim Peters f87d857080 Restore alphabetic order. Also try to import rlcompleter and curses, but
don't fail if they're not available.
2001-01-23 09:50:30 +00:00
Jeremy Hylton 578ceee042 Add simple test of list comprehension that uses a name that isn't
otherwise used in the same code block.  (Not sure this is the right
place, but there is no test_list_comprehensions.py.)
2001-01-23 01:51:40 +00:00
Guido van Rossum d0f5e70016 - Use "exec ... in dict" to avoid having to walk on eggshells; locals
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?)
2001-01-22 23:37:04 +00:00
Tim Peters 763cb0aa44 Typo repair. 2001-01-22 22:43:35 +00:00
Tim Peters e935816164 Reorganize pickle/cPickle testing so the tests pass regardless of the order
they're run.
2001-01-22 22:05:20 +00:00
Fred Drake d74804db41 The "user" module cannot reasonably be tested. Moved to the end (and
commented it out), and added an explanation as to *why*.

Added period to docstring.
2001-01-22 19:38:37 +00:00
Guido van Rossum 7f9b5e014b OK, changed my mind once more on this. The comparison hierarchy is
now

    None < all numeric types < all other types

so that once again

    map(max, Squares(3), Squares(2))

equals

    [0, 1, 4]
2001-01-22 19:30:07 +00:00
Guido van Rossum d9bae8b95a Numeric-smelling objects now once again compare smaller than
non-numeric ones, so 4 < None again in the 'map' test.
2001-01-22 16:01:24 +00:00
Guido van Rossum f317a18a4a Finn Bock (SF patch #103345): Avoid outdated exec form in
test_class.py.
2001-01-22 14:51:41 +00:00
Tim Peters d304f44906 Patch #103343: Allow the important test_pkg to succeed under Jython. 2001-01-21 19:51:53 +00:00
Tim Peters 08dabf0a73 Patch #103344: Sort dicts from extcall for easier comparison with Jython. 2001-01-21 18:52:02 +00:00
Tim Peters dfc538acae Whitespace normalization. 2001-01-21 04:49:16 +00:00
Skip Montanaro eccd02a40d more __all__ updates 2001-01-20 23:34:12 +00:00
Skip Montanaro e78b92a062 added some tests for urlencode 2001-01-20 20:22:30 +00:00
Skip Montanaro e99d5ea25b added __all__ lists to a number of Python modules
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.
2001-01-20 19:54:20 +00:00
Skip Montanaro c955f89225 docstring typo 2001-01-20 19:12:54 +00:00
Fredrik Lundh f60560626c Better error message if ucnhash cannot be found (obscure attribute
errors aren't that helpful), or doesn't contain what's expected from
it.  Also tweaked the test script so it compiles even if ucnhash is
missing.
2001-01-20 11:15:25 +00:00
Guido van Rossum 0a5f91f1d9 Now that Marc-Andre has retracted unistr(), remove the tests. 2001-01-19 21:57:52 +00:00
Guido van Rossum a8e14d4d03 Use a saner test filename, to work on Windows. 2001-01-19 21:06:50 +00:00
Barry Warsaw 2e9b396740 Add some regression tests of coredump bugs in funcobject.c 2.31. Also
added a test of a coredump that would occur when del'ing
func_defaults (put here for convenience).
2001-01-19 19:55:12 +00:00
Guido van Rossum a1374e429b Change verify() function to raise TestFailed, not AssertionError.
(I realize that I didn't really test this, because all the tests
succeed, so verify() never raised an AssertionError -- but the test
suite still succeeds, so I'm not too worried.)
2001-01-19 19:01:56 +00:00
Fredrik Lundh 2acb54a194 improved the ucnhash test a bit 2001-01-19 11:13:46 +00:00
Fredrik Lundh ee865c64da added "getcode" and "getname" methods to the ucnhash module (they're
probably more useful for the test code than for any applications, but
one never knows...)
2001-01-19 11:00:42 +00:00
Fredrik Lundh 0fdb90cafe refactored the unicodeobject/ucnhash interface, to hide the
implementation details inside the ucnhash module.

also cleaned up the unicode copyright blurb a little; Secret Labs'
internal revision history isn't that interesting...
2001-01-19 09:45:02 +00:00
Tim Peters cc58363611 urllib.py very recently changed to produce uppercase escapes, but no
corresponding changes were made to its std test.
2001-01-19 07:00:08 +00:00
Tim Peters 8880f6d3c4 Whitespace normalization. 2001-01-19 06:12:17 +00:00
Tim Peters 1a8a53d16f test_urllib is failing on Windows. I don't know why, but I can at least
change the test to give a clue about *where* it's failing.
2001-01-19 06:06:37 +00:00
Tim Peters 983874dd32 Use constructor form of "raise"; normalize <wink> docstrings. 2001-01-19 05:59:21 +00:00
Tim Peters d93c0b6a37 Jeremy's patch #103323: trivial tests of all untested modules. 2001-01-19 05:41:36 +00:00
Jeremy Hylton e1bb5f9814 make error msg more informative when test of exec fails 2001-01-19 03:26:33 +00:00
Jeremy Hylton 047e2c93e2 add test for SyntaxError on
def f(a):
        global a
2001-01-19 03:25:56 +00:00
Jeremy Hylton b4ed8c4db0 add test of bastion and rexec to std regression test suite 2001-01-19 03:22:48 +00:00
Guido van Rossum 2312024eb7 Add test that ensures hash() of objects defining __cmp__ or __eq__ but
not __hash__ raises TypeError.
2001-01-18 23:47:15 +00:00
Guido van Rossum 0c6614c789 Add test that ensures hash([]) and hash({}) raise TypeError. 2001-01-18 23:36:14 +00:00
Guido van Rossum 4e8db2ed9d Since I'm about to check in a change to the recursion-detection code
for comparisons that outlaws requets for ordering on recursive data
structures, remove the tests for ordering recursive data structures.
2001-01-18 21:52:26 +00:00
Guido van Rossum 2f1064c77b A dumb test for the dumdbm module. 2001-01-18 16:46:52 +00:00
Guido van Rossum 890f209619 Add test for comparing recursive data types. 2001-01-18 16:21:57 +00:00
Guido van Rossum 9710bd5deb Add test for misbehaving rich comparisons (always returning 0) --
these fall back to __cmp__.
2001-01-18 15:55:59 +00:00
Guido van Rossum c4a6e8b65a Rich comparison tests 2001-01-18 15:48:05 +00:00
Tim Peters d2bf3b7ca6 Whitespace normalization. Leaving tokenize_tests.py alone for now. 2001-01-18 02:22:22 +00:00
Fredrik Lundh f785042433 a bold attempt to fix things broken by MAL's verify patch: import
'verify' iff it's used by a test module...
2001-01-17 21:51:36 +00:00
Guido van Rossum f27cc5bc74 Marc-Andre must not have run these tests -- they used verify() but
didn't import it.  Also got rid of some inconsistent spaces inside
parentheses in test_gzip.py.
2001-01-17 21:43:06 +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
Tim Peters 8551dd6078 Stop creating an unbounded number of "Jack is my hero" files under Windows.
Not that Jack doesn't deserve them, but saying it so often cheapens the
sentiment.
2001-01-17 18:59:46 +00:00
Marc-André Lemburg ad7c98e264 This patch adds a new builtin unistr() which behaves like str()
except that it always returns Unicode objects.

A new C API PyObject_Unicode() is also provided.

This closes patch #101664.

Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
2001-01-17 17:09:53 +00:00
Guido van Rossum 846d6dbbe6 Fix a bizarre typo in the helper class ComparableException: the
__getattr__() method, which clearly (like the other methods) was
intended to pass the __getattr__() call on to the self.err object,
mistakenly returned getattr(self, self.err) rather than
getattr(self.err, attr).  Since self.err is not a string, this always
raises a TypeError.  Apparently that doesn't bother for the one
attribute for which __getattr__() is actually called ('__coerce__'),
but it broke the rich comparisons stuff that I'm trying to get into
shape, so I'm fixing this now.  (I could also simply remove the
__getattr__() method, but fixing it seems more in the spirit of what
the ComparableException class is trying to do.)
2001-01-17 15:08:37 +00:00