Commit Graph

1561 Commits

Author SHA1 Message Date
Tim Peters 8044055d82 Somebody made list.__dict__ grow a '__doc__' key, but apparently didn't
run the test suite afterwards.  Either that, or whether '__doc__' shows
up is platform-dependent!
2002-02-19 04:25:19 +00:00
Tim Peters e4418609f7 Whitespace normalization. 2002-02-16 07:34:19 +00:00
Tim Peters 20882dd174 SF bug #516372: test_thread: unhandled exc. in thread
Fix exit races in test_thread.py and test_threaded_import.py.
I suspect the bug is provokable only under Linux (where child threads
seem to get lots of cycles before they get killed after the main thread
exits), or on multi-processor machines running other OSes.
Bugfix candidate.
2002-02-16 07:26:27 +00:00
Fred Drake 4a02f9542f Added regression test for start()/stop() returning bogus NULL. 2002-02-08 21:29:22 +00:00
Neal Norwitz af64263afc Fix typo 2002-02-08 20:13:53 +00:00
Marc-André Lemburg bd3be8f0ca Fix to the UTF-8 encoder: it failed on 0-length input strings.
Fix for the UTF-8 decoder: it will now accept isolated surrogates
(previously it raised an exception which causes round-trips to
fail).

Added new tests for UTF-8 round-trip safety (we rely on UTF-8 for
marshalling Unicode objects, so we better make sure it works for
all Unicode code points, including isolated surrogates).

Bumped the PYC magic in a non-standard way -- please review. This
was needed because the old PYC format used illegal UTF-8 sequences
for isolated high surrogates which now raise an exception.
2002-02-07 11:33:49 +00:00
Marc-André Lemburg 3688a882d3 Fix for the UTF-8 memory allocation bug and the UTF-8 encoding
bug related to lone high surrogates.
2002-02-06 18:09:02 +00:00
Tim Peters d9fbf353a1 This test left a new set of 3 junk files behind each time it was run. 2002-01-30 07:32:53 +00:00
Barry Warsaw 6423f8b884 Test case of a singleton multipart; i.e. a multipart/* with only one
subpart.
2002-01-27 06:49:26 +00:00
Barry Warsaw 763af4173d test_multipart_one_part(): Idempotency test case for a multipart/*
with only one subpart.
2002-01-27 06:48:47 +00:00
Guido van Rossum eaa0a22f43 Disable code intended for PEP 277. 2002-01-15 21:25:51 +00:00
Fred Drake 5e99731ab9 Only test ntpath.abspath() on Windows. This allows the rest of the module to
be tested regardless of the host platform.
2002-01-15 03:46:43 +00:00
Mark Hammond e843e482ce Ensure Unicode filenames work with glob - they already do, but the test seems worth keeping. 2002-01-07 02:11:43 +00:00
Marc-André Lemburg f853be980e Restore Python 2.1 StringIO.py behaviour: support concatenating
Unicode string snippets to larger Unicode strings.

This fix should also go into Python 2.2.1.
2002-01-06 17:15:05 +00:00
Fred Drake 1e2fb57b5f Remove unused imports, clean up trailing whitespace. 2002-01-05 17:12:57 +00:00
Martin v. Löwis ea752fbb86 Check for time.struct_time in addition to tuples. Use 3 characters
for zone hours. Fixes #499169.
2002-01-05 11:31:49 +00:00
Neal Norwitz 653d85fc86 SF Patch #494867 test file methods
Test that the file methods raise ValueError when called on a closed file.
Test .isatty()
Test name, closed attributes
2002-01-01 19:11:13 +00:00
Tim Peters 77902970c5 test_support: add a docstring to vereq().
test_complex:  repair new test's usage of vereq().
2001-12-29 17:34:57 +00:00
Neal Norwitz 5a0f010c67 SF Patch #497487 add test to compare conjugate of a complex number 2001-12-29 14:31:46 +00:00
Neal Norwitz fc37af85bf SF Patch #494873 add tests for complex numbers including calls to int()/long() 2001-12-29 01:02:21 +00:00
Neal Norwitz 32f41536cb SF Patch #494874 add tests for int()/long() invalid parameters 2001-12-29 00:35:20 +00:00
Neal Norwitz 707690132f SF Patch #494872 test repr() of a built-in module 2001-12-29 00:25:42 +00:00
Neal Norwitz 26e5341c00 SF Patch #494876, test invalid parameters to pow() 2001-12-29 00:16:09 +00:00
Guido van Rossum 2764a3a50e Fix for SF bug ##497426: can't deepcopy recursive new objects
deepcopy(), _reconstruct(): pass the memo to the other function, so
that recursive data structures built out of new-style objects may be
deeply copied correctly.

2.2.1 bugfix!
2001-12-28 21:39:03 +00:00
Barry Warsaw 52acb49298 Merge of the release22 branch changes back into the trunk. 2001-12-21 20:04:22 +00:00
Barry Warsaw eae36ac5c3 test_parseaddr_empty(): New test for assuring that
Utils.parseaddr('<>') -- i.e. on an empty address, returns the empty
string.  Built on rfc822, this used to return None.
2001-12-20 16:37:27 +00:00
Tim Peters 2b26a8627b Whitespace normalization. 2001-12-20 06:18:15 +00:00
Guido van Rossum 04a866170d Add test for pickling new-style class with custom metaclass. 2001-12-19 16:58:54 +00:00
Fred Drake 5935ff07be Add some additional tests that check more proxy behaviors. 2001-12-19 16:54:23 +00:00
Fred Drake 694ed091af Fix the test control support for the pickle & cPickle tests so the tests run
under regrtest.
2001-12-19 16:42:15 +00:00
Guido van Rossum 1444f67fa0 The test using class initarg failed, because it was lacking a
__safe_for_unpickling__ attribute.
2001-12-19 16:38:29 +00:00
Guido van Rossum 796e1e0b30 Don't call resetwarnings(). Be more restrictive in what we filter out
instead.
2001-12-15 18:04:10 +00:00
Jack Jansen f839c27027 Added test_socketserver and test_unicode_file to tests expected to be
skipped on Mac OS X. Not sure yet about test_locale.py: this may be
due to my copy of Mac OS X (although it talks english fine enough).
2001-12-14 21:28:53 +00:00
Guido van Rossum e54616cb6f (Merge into trunk.)
Fix for SF bug #492345.  (I could've sworn I checked this in, but
apparently I didn't!)

This code:

    class Classic:
        pass

    class New(Classic):
        __metaclass__ = type

attempts to create a new-style class with only classic bases -- but it
doesn't work right.  Attempts to fix it so it works caused problems
elsewhere, so I'm now raising a TypeError in this case.
2001-12-14 04:19:56 +00:00
Jeremy Hylton f36cfef1ae Undo inadvertent change to test_scope in previous checkin 2001-12-13 20:00:26 +00:00
Fred Drake 68773e779a Add a comment explaining what these tests are for, and where to look for
tests of complex().
2001-12-13 19:57:53 +00:00
Fred Drake 526c7a0101 Ensure that complex() only accepts a string argument as the first arg,
and only if there is no second arg.
This closes SF patch #479551.
2001-12-13 19:52:22 +00:00
Jeremy Hylton 3095a4c228 Update output generated by test_scope 2001-12-13 19:47:51 +00:00
Jeremy Hylton ccae8377a3 Add test for SF bug [ #492403 ] exec() segfaults on closure's func_code 2001-12-13 19:45:04 +00:00
Fred Drake d077ca1e7c Very small test suite for the calendar module, mostly to check a constraint
on the return values from isleap().  Also checks firstweekday() and
setfirstweekday().
2001-12-12 05:38:08 +00:00
Tim Peters 017052152b Fiddle test_class so it passes with -Qnew. 2001-12-11 19:28:47 +00:00
Tim Peters e93e477215 Fiddle test_augassign so it passes under -Qnew. 2001-12-11 19:20:15 +00:00
Martin v. Löwis df8adcd7ba Ignore SIGXFSZ. Fixes #490453. 2001-12-11 17:57:26 +00:00
Guido van Rossum 29d260670e Additional coverage tests by Neil Norwitz.
(SF patch #491418, #491420, #491421.)
2001-12-11 04:37:34 +00:00
Fred Drake 2a64f4693d Regression test for SF bug #478534 -- exceptions could "leak" into a weakref
callback.
2001-12-10 23:46:02 +00:00
Finn Bock 2b29cb2593 Skipping some tests by adding the usual jython conditional test around:
- the repr of unicode. Jython only add the u'' if the string contains char
  values > 255.
- A unicode arg to unicode() is perfectly valid in jython.
- A test buffer() test. No buffer() on Jython

This closes patch "[ #490920 ] Jython and test_unicode".
2001-12-10 20:57:34 +00:00
Finn Bock 793ead5696 A workaround for the missing buffer() builtin in jython.
This closes patch "[ #490850 ] Jython and test_StringIO".
2001-12-09 20:06:32 +00:00
Fredrik Lundh 82b230732f bug #133283, #477728, #483789, #490573
backed out of broken minimal repeat patch from July

also fixed a couple of minor potential resource leaks in pattern_subx
(Guido had already fixed the big one)
2001-12-09 16:13:15 +00:00
Finn Bock ed69aeedb9 test(): Avoid a UnboundLocalError when a method is missing from both the string
module and from string methods.

This closes patch "[ #490811 ] Jython and test_string".
2001-12-09 16:06:29 +00:00
Finn Bock d08011a0e1 Moved a print statement outside the jython platform test. Otherwise
the output fails to compare correctly for jython. This change was part
of the original patch #403666.
2001-12-09 10:19:25 +00:00