| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
more sense as a callable.
|
|
|
|
| |
rather than a list of triples.
|
|
|
|
|
|
| |
into their own class, OutputChecker.
- Added optional OutputChecker arguments to DocTestRunner,
DocTestCase, DocTestSuite.
|
|
|
|
|
|
|
|
|
| |
the string one line at a time. The resulting code is (in my opinion,
anyway), much easier to read. In the process, I found and fixed a
bug in the orginal parser's line numbering in error messages (it was
inconsistant between 0-based and 1-based). Also, check for missing
blank lines after the prompt on all prompt lines, not just PS1 lines
(test added).
|
| |
|
| |
|
|
|
|
|
| |
raise SyntaxError. test_compiler passes now on WinXP, at least in a
release-build non-O run.
|
| |
|
|
|
|
|
| |
it. Else when this fails, there's no way to tell which file it was
chewing on.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added XXX comment about why the undocumented PyRange_New() API function
is too broken to be worth the considerable pain of repairing.
Changed range_new() to stop using PyRange_New(). This fixes a variety
of bogus errors. Nothing in the core uses PyRange_New() now.
Documented that xrange() is intended to be simple and fast, and that
CPython restricts its arguments, and length of its result sequence, to
native C longs.
Added some tests that failed before the patch, and repaired a test that
relied on a bogus OverflowError getting raised.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This got slammed in when find() was fixed to stop grabbing doctests
from modules imported *by* the module being tested. Such tests cannot
be expected to succeed, since they'll be run with the current module's
globals. Dozens of Zope3 doctests were failing because of that.
It wasn't clear why ignore_imports got added then. Maybe it's because
some existing tests failed when the change was made. Whatever, it's
a Bad Idea so it's gone now.
The only use of it was exceedingly obscure, in test_doctest's "Duplicate
Removal" test. It was "needed" there because, as an artifact of running
a doctest inside a doctest, the func_globals of functions compiled in
the second-level doctest don't match the module globals, and so the
test-finder believed these functions were from a foreign module and
skipped them. But that took a long time to figure out, and I actually
understand some of this stuff <0.9 wink>.
That problem was resolved by moving the source code for the second-level
doctest into an actual module (test/doctest_aliases.py).
The only remaining difficulty was that the test for the deprecated
Tester.rundict() then failed, because the test finder doesn't take
module=None at face value, trying to guess which module the user really
intended then. Its guess wasn't appropriate for what Tester.rundict
needs when module=None is given to *it*, which is "no, there is no
module here, and I mean it". So now passing module=False means exactly
that. This is hokey, but ignore_imports=False was really a hack to worm
around that there was no way to tell the test-finder that module=None
*sometimes* means what it says. There was no use case for the combination
of passing a real module with ignore_imports=False.
|
|
|
|
| |
* Facilitate reloads of local thread.
|
| |
|
|
|
|
| |
except internal tests.
|
| |
|
|
|
|
|
|
|
| |
Ripped out the docs for the new DocTestFinder's namefilter argument,
and renamed it to _namefilter; this only existed to support isprivate.
Removed the new DocTestFinder's objfilter argument. No point adding
more cruft to a broken filtering design.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
as discussed on IRC. The equivalent tests for the new behavior are in
test_builtin.py.
|
|
|
|
|
|
| |
This test is insanely slow, so it requires a resource. On my machine,
it also appears to dump core. I think the problem is a stack
overflow, but haven't been able to confirm.
|
|
|
|
| |
Don't generate code for asserts in -O mode.
|
|
|
|
|
|
|
|
|
|
|
| |
interning were not clear here -- a subclass could be mutable, for
example -- and had bugs. Explicitly interning a subclass of string
via intern() will raise a TypeError. Internal operations that attempt
to intern a string subclass will have no effect.
Added a few tests to test_builtin that includes the old buggy code and
verifies that calls like PyObject_SetAttr() don't fail. Perhaps these
tests should have gone in test_string.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The change to use the newer httplib interface admitted the possibility
that we'd get an HTTP/1.1 chunked response, but the code didn't handle
it correctly. The raw socket object can't be pass to addinfourl(),
because it would read the undecoded response. Instead, addinfourl()
must call HTTPResponse.read(), which will handle the decoding.
One extra wrinkle is that the HTTPReponse object can't be passed to
addinfourl() either, because it doesn't implement readline() or
readlines(). As a quick hack, use socket._fileobject(), which
implements those methods on top of a read buffer. (suggested by mwh)
Finally, add some tests based on test_urllibnet.
Thanks to Andrew Sawyers for originally reporting the chunked problem.
|
| |
|
|
|
|
|
|
|
|
|
| |
Specifically, time.strftime() no longer accepts a 0 in the yday position of a
time tuple, since that can crash some platform strftime() implementations.
parsedate_tz(): Change the return value to return 1 in the yday position.
Update tests in test_rfc822.py and test_email.py
|
|
|
|
|
|
| |
Hack httplib to work with broken Akamai proxies.
Make sure that httplib doesn't add extract Accept-Encoding or
Content-Length headers if the client has already set them.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
\r\n only get the \n stripped, not the \r (unless it's the last header which
does get the \r stripped). Patch by Tony Meyer.
test_whitespace_continuation_last_header(),
test_strip_line_feed_and_carriage_return_in_headers(): New tests.
_parse_headers(): Be sure to strip \r\n from the right side of header lines.
|
|
|
|
|
|
|
| |
[ 1005123 ] test_curses fails on MacOS X 10.3
Be a bit more guarded about what we expect a terminal to be capable
of.
|
| |
|
|
|
|
|
|
|
| |
[ 1005008 ] curses.wrapper should also forward keyword args
Plus my rewrite to use finally as opposed to painfully doing the
equivalent by hand.
|
| |
|
| |
|
|
|
|
|
| |
This got fixed "by magic" as part of the refactoring, but wasn't tested
as such. Now it is.
|
| |
|
|
|
|
|
| |
* Protect the pre-defined contexts by using a deepcopy() instead of copy().
* Micro-optimization: prefer x&1 over x%2
|
|
|
|
|
|
| |
This primarily adds more powerful ways to work with unittest, including
spiffy support for building suites out of doctests in non-Python
"text files".
|
|
|
|
|
|
| |
python.org . This way the delay should be great enough for
testConnectTimeout() to pass even when one has a really fast Net connection
that allows connections faster than .001 seconds.
|
|
|
|
|
|
| |
TIS-620.
Closes SF bug #1001895: Adding missing ISO 8859 codecs, especially Thai.
|
| |
|
|
|
|
|
| |
in a -O run, and so test_doctest was failing under -O. Simple cause,
simple cure.
|
|
|
|
|
|
|
|
| |
the tim-doctest-merge-24a2 tag on the the tim-doctest-branch branch.
We did development on the branch in case it wouldn't land in time for
2.4a2, but the branch looked good: Edward's tests passed there, ditto
Python's tests, and ditto the Zope3 tests. Together, those hit doctest
heavily.
|
|
|
|
|
|
|
| |
place! (can that please be it for silly mistakes in this file? :-) I
know I started it, but...).
Also, rearrangements to run repeatedly.
|
|
|
|
| |
integer.
|
|
|
|
| |
problems when run twice (SF #1002537)
|