Commit Graph

487 Commits

Author SHA1 Message Date
Collin Winter d28fcbc7fb Consolidate patches #1690164, 1683397, and 1690169, all of which refactor XML-related test suites. The patches are applied together because they use a common output/xmltests file.
Thanks to Jerry Seutter for all three patches.
2007-03-28 23:34:06 +00:00
Collin Winter 6de691d78c Remove test/output/test_popen2 (missed in r54417). 2007-03-16 21:15:35 +00:00
Collin Winter cb637c9ea3 Patch #1670993: Refactor test_threadedtempfile.py to use unittest. 2007-03-12 17:24:07 +00:00
Collin Winter f567ca3e1a Patch #1678088: convert test_operations to use unittest, fold the result into test_dict. 2007-03-12 15:57:19 +00:00
Georg Brandl 9decc0dc8b Patch #1675471: convert test_pty to unittest. 2007-03-07 11:37:42 +00:00
Walter Dörwald 4b884a5cc2 Port test_popen.py to unittest. 2007-01-24 00:42:19 +00:00
Walter Dörwald 71cd55150b Port test_new.py to unittest. 2007-01-20 23:07:28 +00:00
Walter Dörwald 9fab9a7da8 Port test_resource.py to unittest. 2007-01-20 17:28:31 +00:00
Walter Dörwald f008203cb4 Move xdrlib tests from the module into a separate test script,
port the tests to unittest and add a few new tests.
2006-12-01 16:59:47 +00:00
Georg Brandl 59ba4299d0 Remove leftover test output file. 2006-10-29 20:35:12 +00:00
Georg Brandl cd97208110 Convert test_openpty to unittest. 2006-10-29 20:31:17 +00:00
Georg Brandl e8328ba723 Convert test_MimeWriter to unittest. 2006-10-29 20:28:26 +00:00
Georg Brandl 71a2089712 Completely convert test_httplib to unittest. 2006-10-29 20:24:01 +00:00
Georg Brandl e184433654 Convert test_cgi to unittest. 2006-10-29 20:09:12 +00:00
Georg Brandl a962eb32d9 Convert test_cookie to unittest. 2006-10-29 19:51:16 +00:00
Georg Brandl bd0fb14e51 Convert test_types to unittest. 2006-10-29 19:35:03 +00:00
Georg Brandl 850b2be67e Convert test_nis to unittest. 2006-10-29 19:24:43 +00:00
Georg Brandl eecce795a3 Convert test_poll to unittest. 2006-10-29 19:20:45 +00:00
Georg Brandl 3163179f1b Convert test_mmap to unittest. 2006-10-29 19:13:40 +00:00
Georg Brandl 0b679629c6 Convert test_opcodes to unittest. 2006-10-28 13:56:58 +00:00
Georg Brandl 2f03760a98 Convert test_math to unittest. 2006-10-28 13:51:49 +00:00
Georg Brandl c6fdec6d7e Convert test_global, test_scope and test_grammar to unittest.
I tried to enclose all tests which must be run at the toplevel
(instead of inside a method) in exec statements.
2006-10-28 13:10:17 +00:00
Jeremy Hylton 76467ba6d6 Bug fixes large and small for tokenize.
Small: Always generate a NL or NEWLINE token following
       a COMMENT token.  The old code did not generate an NL token if
       the comment was on a line by itself.

Large: The output of untokenize() will now match the
       input exactly if it is passed the full token sequence.  The
       old, crufty output is still generated if a limited input
       sequence is provided, where limited means that it does not
       include position information for tokens.

Remaining bug: There is no CONTINUATION token (\) so there is no way
for untokenize() to handle such code.

Also, expanded the number of doctests in hopes of eventually removing
the old-style tests that compare against a golden file.

Bug fix candidate for Python 2.5.1. (Sigh.)
2006-08-23 21:14:03 +00:00
Guido van Rossum 9568b738ec Chris McDonough's patch to defend against certain DoS attacks on FieldStorage.
SF bug #1112549.
2006-08-10 17:41:07 +00:00
Greg Ward 7802af426e Be a lot smarter about whether this test passes: instead of assuming
that a 2.93 sec audio file will always take 3.1 sec (as it did on the
hardware I had when I first wrote the test), expect that it will take
2.93 sec +/- 10%, and only fail if it's outside of that range.
Compute the expected
2006-07-23 02:25:53 +00:00
Andrew MacIntyre 93e3ecb1f4 Increase the small thread stack size to get the test
to pass reliably on the one buildbot that insists on
more than 32kB of thread stack.
2006-06-13 19:02:35 +00:00
Andrew MacIntyre 9291332de1 Patch #1454481: Make thread stack size runtime tunable.
Heavily revised, comprising revisions:
46640 - original trunk revision (backed out in r46655)
46647 - markup fix (backed out in r46655)
46692:46918 merged from branch aimacintyre-sf1454481

branch tested on buildbots (Windows buildbots had problems
not related to these changes).
2006-06-13 15:04:24 +00:00
Tim Peters 28eeefe566 Revert revisions:
46640 Patch #1454481:  Make thread stack size runtime tunable.
46647 Markup fix

The first is causing many buildbots to fail test runs, and there
are multiple causes with seemingly no immediate prospects for
repairing them.  See python-dev discussion.

Note that a branch can (and should) be created for resolving these
problems, like

svn copy svn+ssh://svn.python.org/python/trunk -r46640 svn+ssh://svn.python.org/python/branches/NEW_BRANCH

followed by merging rev 46647 to the new branch.
2006-06-04 23:52:47 +00:00
Andrew MacIntyre 6539d2d3c7 Patch #1454481: Make thread stack size runtime tunable. 2006-06-04 12:31:09 +00:00
Armin Rigo 35f6d36951 [ 1497053 ] Let dicts propagate the exceptions in user __eq__().
[ 1456209 ] dictresize() vulnerability ( <- backport candidate ).
2006-06-01 13:19:12 +00:00
Georg Brandl cdcede62c0 Convert test_exceptions to unittest. 2006-05-30 08:47:19 +00:00
Richard Jones 7b9558d37d Conversion of exceptions over from faked-up classes to new-style C types. 2006-05-27 12:29:24 +00:00
Neal Norwitz 349c0ed27f Convert test_compare to use unittest. Hopefully we can find out
why this breaks on openbsd sometimes.
2006-04-09 04:50:18 +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
Brett Cannon bf36409e2a PEP 352 implementation. Creates a new base class, BaseException, which has an
added message attribute compared to the previous version of Exception.  It is
also a new-style class, making all exceptions now new-style.  KeyboardInterrupt
and SystemExit inherit from BaseException directly.  String exceptions now
raise DeprecationWarning.

Applies patch 1104669, and closes bugs 1012952 and 518846.
2006-03-01 04:25:17 +00:00
Jeremy Hylton 7b03bade2b Test case to cover subscription bug from SF 1333982 2006-02-28 17:46:23 +00:00
Armin Rigo a871ef2b3e Added the cProfile module.
Based on lsprof (patch #1212837) by Brett Rosen and Ted Czotter.
With further editing by Michael Hudson and myself.
History in svn repo: http://codespeak.net/svn/user/arigo/hack/misc/lsprof

* Module/_lsprof.c is the internal C module, Lib/cProfile.py a wrapper.
* pstats.py updated to display cProfile's caller/callee timings if available.
* setup.py and NEWS updated.
* documentation updates in the profiler section:
   - explain the differences between the three profilers that we have now
   - profile and cProfile can use a unified documentation, like (c)Pickle
   - mention that hotshot is "for specialized usage" now
   - removed references to the "old profiler" that no longer exists
* test updates:
   - extended test_profile to cover delicate cases like recursion
   - added tests for the caller/callee displays
   - added test_cProfile, performing the same tests for cProfile
* TO-DO:
   - cProfile gives a nicer name to built-in, particularly built-in methods,
     which could be backported to profile.
   - not tested on Windows recently!
2006-02-08 12:53:56 +00:00
Neal Norwitz 0e6bc8c260 Patch #1407135, bug #1424041, make mmap.mmap(-1, length) work the same
on both Unix (SVR4 and BSD) and Windows.  Restores behaviour of passing -1
for anonymous memory on Unix.  Use MAP_ANONYMOUS instead of _ANON since
the latter is deprecated according to Linux (gentoo) man pages.

Should we continue to allow mmap.mmap(0, length) to work on Windows?
0 is a valid fd.

Will backport bugfix portions.
2006-02-05 05:45:43 +00:00
Vinay Sajip 80d2df86dc Added a test for the ability to specify a class attribute in Formatter configuration. Contributed by Shane Hathaway. 2006-01-20 18:28:59 +00:00
Vinay Sajip fe03bee62f Changes due to added test for fileConfig contributed by Shane Hathaway. 2006-01-16 21:25:28 +00:00
Neal Norwitz 3b4fff8079 Fix SF bug #1402308, segfault when using mmap(-1, ...)
This didn't crash on Linux, but valgrind complained.
I'm not sure if this test is valid on Windows.

Will backport.
2006-01-11 08:54:45 +00:00
Neal Norwitz 6d98ed4ad2 Oops, forgot to add the output file to 41388. 2005-11-03 05:07:15 +00:00
Jeremy Hylton 3e0055f8c6 Merge ast-branch to head
This change implements a new bytecode compiler, based on a
transformation of the parse tree to an abstract syntax defined in
Parser/Python.asdl.

The compiler implementation is not complete, but it is in stable
enough shape to run the entire test suite excepting two disabled
tests.
2005-10-20 19:59:25 +00:00
Georg Brandl 62fe585b4b *** empty log message *** 2005-08-26 13:21:50 +00:00
Georg Brandl 22bfdab682 Adapt output file to new Cookie JS output. 2005-06-27 05:51:07 +00:00
Michael W. Hudson 7390942aa1 test_asynchat is no longer expected to produce output.
also, wait for threads to finish before proceeding.
2005-06-20 13:45:34 +00:00
Greg Ward 50682d0f78 SF #818006: merge from release24-maint branch: add useful read-only
attributes to oss_audio_device object: 'closed', 'name', and 'mode'.
2005-03-07 01:41:11 +00:00
Martin v. Löwis 7fe60c0a0a Patches #749830, #1144555: allow UNIX mmap size to default to current
file size.
2005-03-03 11:22:44 +00:00
Martin v. Löwis c2a0ac20b7 Patch #1049151: adding bool support to xdrlib.py.
Also add xdrlib._test into the test suite.
2005-02-24 20:22:10 +00:00