Commit Graph

2118 Commits

Author SHA1 Message Date
Martin v. Löwis 00b6127097 Patch #650653: Raise always value error if the table is not 256 bytes long. 2002-12-12 20:03:19 +00:00
Walter Dörwald 7e5c6a02eb Change issubclass() so that recursive tuples (directly or indirectly
containing class objects) are allowed as the second argument.
This makes issubclass() more similar to isinstance() where recursive
tuples are allowed too.
2002-12-12 19:14:08 +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
Walter Dörwald d9a6ad3beb Enhance issubclass() and PyObject_IsSubclass() so that a tuple is
supported as the second argument. This has the same meaning as
for isinstance(), i.e. issubclass(X, (A, B)) is equivalent
to issubclass(X, A) or issubclass(X, B). Compared to isinstance(),
this patch does not search the tuple recursively for classes, i.e.
any entry in the tuple that is not a class, will result in a
TypeError.

This closes SF patch #649608.
2002-12-12 16:41:44 +00:00
Raymond Hettinger 0efa17c943 Clean-up test class for DictMixin. 2002-12-11 07:16:06 +00:00
Tim Peters efc4b12169 Added test_ossaudiodev to expected skips on Windows. 2002-12-10 18:47:56 +00:00
Greg Ward 55a8790c41 Aesthetic tweakery: factor read_sound_file() out of play_sound_file(). 2002-12-10 16:27:35 +00:00
Greg Ward 36dacfa49c Initial revision is rev 1.8 of test_linuxaudiodev.py, with
the obvious s/linuxaudiodev/ossaudiodev/ change made.
2002-12-10 16:24:21 +00:00
Tim Peters bca1cbc6f8 SF 548651: Fix the METH_CLASS implementation.
Most of these patches are from Thomas Heller, with long lines folded
by Tim.  The change to test_descr.py is from Guido.  See the bug report.

Not a bugfix candidate -- METH_CLASS is new in 2.3.
2002-12-09 22:56:13 +00:00
Greg Ward c7e3c5e306 Add test_unicode() to ensure that 1) textwrap doesn't crash on unicode
input, and 2) unicode input means unicode output.  This closes
SF bug #622831.
2002-12-09 16:32:41 +00:00
Greg Ward 24cbbcb57f Added test_initial_whitespace() to ensure that SF bug #622849 is fixed.
Change LongWordTestCase.setUp() -- remove leading whitespace from
  text string.
Comment fix.
2002-12-09 16:27:15 +00:00
Skip Montanaro 3bf99e3e87 Add support for binary pickles to the shelve module. In some situations
this can result in significantly smaller files.  All classes as well as the
open function now accept an optional binary parameter, which defaults to
False for backward compatibility.  Added a small test suite, updated the
libref documentation (including documenting the exported classes and fixing
a few other nits) and added a note about the change to Misc/NEWS.
2002-12-08 18:36:24 +00:00
Raymond Hettinger 065c06a622 Add another test which exercises the whole suite with a
heapsort and verifies the result against list.sort().
2002-12-07 10:33:42 +00:00
Raymond Hettinger c2e095f6f4 Fix typo in abstract.c which caused __rpow__ to not be invoked.
Added related testcase.
Closes SF bug #643260.
2002-12-07 10:05:27 +00:00
Raymond Hettinger babc83a27a Cleaned up test (removing bogus argument list). 2002-12-07 09:04:29 +00:00
Raymond Hettinger e03e5b1f91 Remove assumption that cls is a subclass of dict.
Simplifies the code and gets Just van Rossum's example to work.
2002-12-07 08:10:51 +00:00
Michael W. Hudson a69c030c15 The final tweaks before closing
[ 633152 ] list slice ass ignores subtypes of list

Allow arbitrary sequences on the RHS of extended slices.
2002-12-05 21:32:32 +00:00
Jason Tishler e257ec9ef7 Patch #648998: test_commands ACL patch
Although motived by Cygwin, this patch will prevent
test_commands from failing on Unixes that support
ACLs. For example, the following is an excerpt from
the Solaris ls manpage:

	...
	-rwxrwxrwx+ 1 smith dev 10876 May 16 9:42 part2

	The plus sign indicates that there is an ACL associated
	with the file.
	...
2002-12-05 20:18:39 +00:00
Tim Peters b0f89e05ad Add a Cygwin skip mentioned by Jason Tishler. 2002-12-05 17:20:25 +00:00
Jason Tishler 2511594060 Patch #551977: Regression exceptions for cygwin
This patch updates regrtest.py to understand which
tests are normally skipped under Cygwin. The list of
tests was verified with the Cygwin Python maintainer.
2002-12-05 15:18:15 +00:00
Raymond Hettinger b02bb5ed0a Replace BadInternalCall with TypeError. Add a test case. Fix whitespace.
Just van Rossum showed a weird, but clever way for pure python code to
trigger the BadInternalCall.  The C code had assumed that calling a class
constructor would return an instance of that class; however, classes that
abuse __new__ can invalidate that assumption.
2002-12-04 07:32:25 +00:00
Tim Peters b4ee4eb3b3 Rearrange test_socket_ssl so that a skip is expected iff the network
resource isn't enabled or the socket module doesn't support ssl.
2002-12-04 03:26:57 +00:00
Guido van Rossum 9d4270070a Some more expected skips on OSX. 2002-12-03 10:24:56 +00:00
Guido van Rossum 6c7340552c Lose references to knee (no longer exists) and pyclbr (has its own
test suite now).
2002-12-03 09:34:54 +00:00
Guido van Rossum 7f6a439040 Add more sophistication to the comparison between pyclbr output and
real module, by filtering out aliased methods.  This, combined with
the recent fixes to pyclbr, make it possible to enable more tests with
fewer exceptions.
2002-12-03 08:16:50 +00:00
Guido van Rossum 0ed7aa1e03 Moderately heavy reorganization of pyclbr to fix package-related bugs.
- The _modules cache now uses the full module name.

- The meaning of the (internal!!!) inpackage argument is changed: it
  now is the parent package name, or None.  readmodule() doesn't
  support this argument any more.

- The meaning of the path argument is changed: when inpackage is set,
  the module *must* be found in this path (as is the case for the real
  package search).

- Miscellaneous cleanup, e.g. fixed __all__, changed some comments and
  doc strings, etc.

- Adapted the unit tests to the new semantics (nothing much changed,
  really).  Added some debugging code to the unit tests that print
  helpful extra info to stderr when a test fails (interpreting the
  test failures turned out to be hard without these).
2002-12-02 14:54:20 +00:00
Guido van Rossum 3b10dc3554 Require 'largefile' resource for Mac OSX as well. 2002-12-02 10:42:30 +00:00
Guido van Rossum bb48465273 On Max OSX, try increasing the stack limit to 2048 so test_re and
test_sre won't die with a SegFault.
2002-12-02 09:56:21 +00:00
Ka-Ping Yee a59ef7bbe0 getdoc():
Remove leading whitespace from first line; remove leading and
    trailing blank lines from docstrings.  (Patch 645938 submitted
    by David Goodger.)
2002-11-30 03:53:15 +00:00
Michael W. Hudson ade8c8b2c3 Nudge getting __module__ and __name__ for new-style classes so that
the results of *setting* __name__ are not so surprising.

If people can suggest more tests, that'd be grand, or is what's there
sufficient?
2002-11-27 16:29:26 +00:00
Neal Norwitz deaba57009 SF #641170, reST version of Lib/test/README
Convert test/README to reST
2002-11-27 15:47:10 +00:00
Michael W. Hudson 7e7c00db0c I don't know why staring at the email to python-checkins made me
see problems with my code that I didn't see before the checkin, but:

When a subtype .mro() fails, we need to reset the type whose __bases__
are being changed, too.  Fix + test.
2002-11-27 15:40:09 +00:00
Michael W. Hudson 586da8fddd Readjustments to the way we cope with exceptions from subclasses'
mro() methods.  Now any exception aborts the whole __bases__ change.

And more tests.
2002-11-27 15:20:19 +00:00
Michael W. Hudson caf17be1b7 I had the inheritance cycle stuff backwards. Oops! 2002-11-27 10:24:44 +00:00
Martin v. Löwis e16e01fac6 Patch #639112: fixes for None locale and tz. 2002-11-27 08:30:25 +00:00
Raymond Hettinger e4827eb2a2 Bring UserDict in-sync with changes to dict.
Constructor accepts optional keyword arguments after a optional items list.
Add fromkeys() as an alternate constructor from an iterable over keys.
Expand related unittests.
2002-11-27 08:29:11 +00:00
Raymond Hettinger e33d3df030 SF Patch 643443. Added dict.fromkeys(iterable, value=None), a class
method for constructing new dictionaries from sequences of keys.
2002-11-27 07:29:33 +00:00
Guido van Rossum a01fa26396 The MRO conflict error message depends on dictionary hash order.
Avoid depending on this in the test.
2002-11-27 04:00:59 +00:00
Fred Drake 4dd0f7ef7a Add a way to say "use any resource except A". For example, to run
allow the use of any resource except bsddb, give the option
"-uall,-bsddb".
2002-11-26 21:44:56 +00:00
Michael W. Hudson 98bbc49c54 This is my patch:
[ 635933 ] make some type attrs writable

Plus a couple of extra tests beyond what's up there.

It hasn't been as carefully reviewed as it perhaps should, so all readers
are encouraged, nay exhorted, to give this a close reading.

There are still a couple of oddities related to assigning to __name__,
but I intend to solicit python-dev's opinions on these.
2002-11-26 14:47:27 +00:00
Guido van Rossum d32047f038 A tweaked version of Jeremy's patch #642489, to produce better error
messages about MRO conflicts.  (Tweaks here: don't print the message,
but compare it with an expected string.)
2002-11-25 21:38:52 +00:00
Raymond Hettinger 35e48d2426 SF 643115: Set._update() had a special case for dictionaries which allowed
non-true values to leak in.  This threw-off equality testing which depends
on the underlying dictionaries having both the same keys and values.
2002-11-25 20:43:55 +00:00
Walter Dörwald 00445d2393 Fix typo in comment. 2002-11-25 17:58:02 +00:00
Martin v. Löwis d5169bad94 Regenerate from Unicode 3.2.0 to include all First/Last ranges. 2002-11-24 23:10:08 +00:00
Tim Peters 1babdfc48a Reduced memory burden by iterating over the normalization test input
file directly (instead of sucking it all into a list of lines first).
2002-11-24 19:19:09 +00:00
Tim Peters 1b445d3fcf Fiddled things so that test_normalization is expected to be skipped if
and only if the test input file doesn't exist.
2002-11-24 18:53:11 +00:00
Tim Peters d332c085ea Skip test_normalization on Windows until it's at least clear why the
data it needs doesn't exist in the project.  If it's a huge file,
maybe the test should be changed to be one of the -u thingies.
2002-11-24 02:40:40 +00:00
Tim Peters b9ac505110 Split long line.
XXX If NormalizationTest.txt is required to run this test, why isn't it
checked into the project?
2002-11-24 02:37:29 +00:00
Tim Peters 77c06fbf94 Whitespace normalization. 2002-11-24 02:35:35 +00:00
Martin v. Löwis 677bde2dd1 Patch #626485: Support Unicode normalization. 2002-11-23 22:08:15 +00:00