Commit graph

3766 commits

Author SHA1 Message Date
Tim Peters
c17976e983 Another crack at bug #1460340: make random.sample(dict)
work, this time by ugly brute force.
2006-04-01 00:26:53 +00:00
Georg Brandl
c90397a7c9 Make test_socket_ssl finally pass on WIn 2006-03-31 21:12:32 +00:00
Georg Brandl
d49be30938 Disable test_socket_ssl timeout test on Windows. 2006-03-31 19:09:56 +00:00
Georg Brandl
ccadf84a1b Patch #1460496: round() now accepts keyword arguments. 2006-03-31 18:54:53 +00:00
Georg Brandl
22ec80bc4f Patch #1462313, bug #1443328: the pickle modules now can handle classes
that have __private names in their __slots__.
2006-03-31 18:25:44 +00:00
Georg Brandl
43f08a85e4 Patch #1380952: fix SSL objects timing out on consecutive read()s 2006-03-31 18:01:16 +00:00
Georg Brandl
dd2245f230 Bug #1250170, Patch #1462230: handle socket.gethostname()
failures gracefully
2006-03-31 17:18:06 +00:00
Georg Brandl
51dbc4c879 traceback now shows error position for all SyntaxError subclasses,
e.g. IndentationError. (bug #1447885)
2006-03-31 15:59:13 +00:00
Thomas Wouters
a6126ba890 Fix the reference leak in test_generators, by explicitly breaking the cycle
we are about to leave behind. An example of the cause of this leak can be
found in the leakers directory, in case we ever want to tackle the
underlying problem.
2006-03-31 15:31:43 +00:00
Walter Dörwald
58917a6083 Bug #947906: An object oriented interface has been added to the calendar
module. It's possible to generate HTML calendar now and the module can be
called as a script (e.g. via ``python -mcalendar``).
2006-03-31 15:26:22 +00:00
Tim Peters
46cc702b72 test_main(): Restore the decimal context that was in
effect at the time test_decimal was imported.  Else
running test_decimal had the bad side effect of
permanently changing the decimal context in effect.
That caused text_tokenize to fail if it ran after
test_decimal.
2006-03-31 04:11:16 +00:00
Tim Peters
ef57567de0 Repaired a number of errors in this test:
- The doctests in decistmt() weren't run at all when
  test_tokenize was run via regrtest.py.

- Some expected output in decistmt() was Windows-specific
  (but nobody noticed because the doctests weren't getting
  run).

- test_roundtrip() didn't actually test anything when
  running the tests with -O.  Now it does.

- Changed test_roundtrip() to show the name of the input
  file when it fails.  That would have saved a lot of
  time earlier today.

- Added a bunch of comments.
2006-03-31 03:17:30 +00:00
Barry Warsaw
176014ffad SF patch #1458476 with modifications based on discussions in python-dev. This
adds the following API calls: PySet_Clear(), _PySet_Next(), and
_PySet_Update().  The latter two are considered non-public.  Tests and
documentation (for the public API) are included.
2006-03-30 22:45:35 +00:00
Armin Rigo
314861c568 Minor bugs in the __index__ code (PEP 357), with tests. 2006-03-30 14:04:02 +00:00
Anthony Baxter
4ef3a23a35 whitespace normalisation 2006-03-30 12:59:11 +00:00
Armin Rigo
5eca19b894 Checking in the test for PEP 357.
This is from the SF tracker as well; for some reason the
content of test_index.py was lost and an empty file was
checked in instead.
2006-03-30 11:28:43 +00:00
Anthony Baxter
67b6d516ce Fixed bug #1459029 - unicode reprs were double-escaped. 2006-03-30 10:54:07 +00:00
Raymond Hettinger
3c3346daa9 SF bug #1460340: random.sample can raise KeyError
Fix the hit and miss style of testing for sets and dicts.
2006-03-29 09:13:13 +00:00
Georg Brandl
80bb2bb7eb Revert r43399. 2006-03-28 19:19:56 +00:00
Georg Brandl
f1349cd05d Bug #1459963: urllib2 now normalizes HTTP header names correctly
with title().
2006-03-28 12:40:24 +00:00
Georg Brandl
019514e854 Make test_augassign pass with -Qnew and convert to unittest. 2006-03-28 10:26:45 +00:00
Georg Brandl
686eaeb0b8 Make test_coercion pass with -Qnew. Converted to unittest on the occasion. 2006-03-28 10:00:53 +00:00
Thomas Wouters
4054b9720b In true regression-test spirit, make sure the
itertools.tee->instance->attribute->itertools.tee and
itertools.tee->teedataobject->itertools.tee cycles, which can be found now
that itertools.tee and its teedataobject participate in GC, remain findable
and cleanable. The test won't fail when they aren't, but at least the
frequent hunt-refleaks runs would spot the rise in refleaks.
2006-03-28 08:44:55 +00:00
Thomas Wouters
a33b2bc873 Add an example of a generator->freevar->cell->generator reference-cycle that
doesn't get cleaned up and thus leaks.
2006-03-28 08:14:24 +00:00
Georg Brandl
96c3f7f56b Make test_decimal work with -Qnew. 2006-03-28 08:06:35 +00:00
Tim Peters
b82cb8dcd5 Part of bug 1459808: fiddle test_input_and_raw_input()
so it passes w/ -Qnew.
2006-03-28 07:39:22 +00:00
Tim Peters
1c5bc1c9d7 Part of bug 1459808: fiddle so that this passes
with or without -Qnew.
2006-03-28 07:28:40 +00:00
Phillip J. Eby
35fd142435 Fix contextlib not copying function attributes 2006-03-28 00:07:24 +00:00
Neal Norwitz
33b730e33c Fix SF bug #1458903 with AST compiler.
def foo((x)): was getting recognized as requiring tuple unpacking
which is not correct.

Add tests for this case and the proper way to unpack a tuple of one:
	def foo((x,)):

test_inpsect was incorrect before.  I'm not sure why it was passing,
but that has been corrected with a test for both functions above.
This means the test (and therefore inspect.getargspec()) are broken in 2.4.
2006-03-27 08:58:23 +00:00
Martin v. Löwis
04855cc100 Fix typo. 2006-03-26 16:40:47 +00:00
Martin v. Löwis
6da56f9428 Patch from Aldo Cortesi: expected skips for OpenBSD. 2006-03-26 10:02:34 +00:00
Martin v. Löwis
c667d052e5 Provide more debug output, to diagnose OpenBSD test failures. 2006-03-26 09:50:11 +00:00
Hye-Shik Chang
9f4b632212 Allow long objects as a position value of error callbacks returned. 2006-03-26 06:21:34 +00:00
Neal Norwitz
7545a6bac2 regsub is gone, nothing to ignore 2006-03-26 04:59:27 +00:00
Neal Norwitz
2c85d826d8 Try to handle sys.getfilesystemencoding() returning None.
ascii seems like the safest bet that it will exist.  I wonder if utf-8
would be a better choice?  This should get test_fileinput passing on OpenBSD.
2006-03-26 03:11:57 +00:00
Hye-Shik Chang
e2ac4abd01 Patch #1443155: Add the incremental codecs support for CJK codecs.
(reviewed by Walter Dörwald)
2006-03-26 02:34:59 +00:00
Georg Brandl
baf05b7e09 fix typo 2006-03-25 13:12:56 +00:00
Raymond Hettinger
c4e94b90a8 Don't decrement below zero. And add more tests. 2006-03-25 12:15:04 +00:00
Tim Peters
e33901eb2b Whitespace normalization. 2006-03-25 01:50:43 +00:00
Phillip J. Eby
6edd258608 Fix a problem with @contextmanager not detecting a broken generator
that yields after a throw().  Make @contextmanager not reraise
exceptions, but return a false value in that case instead.  Add test
cases for both behaviors.
2006-03-25 00:28:24 +00:00
Phillip J. Eby
bee0712214 Support throw() of string exceptions. 2006-03-25 00:05:50 +00:00
Raymond Hettinger
43b00da219 Revert previous change. Wasn't ready yet. 2006-03-24 23:55:32 +00:00
Raymond Hettinger
e751c86dcb Add more tests 2006-03-24 23:47:53 +00:00
Raymond Hettinger
fd3fcf0b35 SF Patch #1455676: Simplify using Queues with daemon consumer threads
Adds join() and task_done() methods to track when all enqueued tasks have
been gotten and fully processed by daemon consumer threads.
2006-03-24 20:43:29 +00:00
Neal Norwitz
cdb7948f97 Use absolute import. 2006-03-24 08:58:38 +00:00
Martin v. Löwis
478c82d30f Bug #1183780: Add Popen objects to _active only in __del__.
Cleanup terminated processes as well.
Add cmd attribute to Popen4.
2006-03-24 08:14:54 +00:00
Neal Norwitz
846d72a7d7 Exceptions should inherit from Exception now. 2006-03-24 08:02:51 +00:00
Neal Norwitz
de868c9a1b Hmmm, I don't think we wanted to test // twice and / not at all (in this section). 2006-03-24 07:30:56 +00:00
Neal Norwitz
5a822fb720 Exceptions should inherit from Exception now. 2006-03-24 07:03:44 +00:00
Martin v. Löwis
c92157ff52 Relax result test for program mode of quopri. 2006-03-23 19:14:23 +00:00