Commit Graph

4430 Commits

Author SHA1 Message Date
Martin v. Löwis 2c07195574 Previous check-in was by mistake, undo it. 2001-06-07 05:52:17 +00:00
Martin v. Löwis 22adac50cb Patch #416220: Fix misplaced paren. 2001-06-07 05:49:05 +00:00
Martin v. Löwis b5d4d2a7d5 Patch #409973: Speedup glob.glob, add fnmatch.filter. 2001-06-06 06:24:38 +00:00
Martin v. Löwis e24fef0dd2 Fix bug #422702: Make flag argument to open optional, and document it that way. 2001-06-05 05:33:19 +00:00
Martin v. Löwis 2750bcc2d1 Add .pyo as an extension, fixes bug #416462. Also restore alphabetic order. 2001-06-05 05:17:00 +00:00
Fred Drake 58422e5820 Convert the parser module test to use PyUnit. 2001-06-04 03:56:24 +00:00
Mark Hammond 194bfb2805 Add some useful Windows encodings - patch #423221. 2001-06-04 02:31:23 +00:00
Martin v. Löwis 351c3d0554 Implement testGetElementsByTagNameNS. 2001-06-03 14:27:02 +00:00
Martin v. Löwis ed525fb0df Fix getElementsByTagNameNS:
- actually return a result
  - Compare with tag.localName in getElementsByTagNameNSHelper
2001-06-03 14:06:42 +00:00
Tim Peters 453163d842 lookdict: stop more insane core-dump mutating comparison cases. Should
be possible to provoke unbounded recursion now, but leaving that to someone
else to provoke and repair.
Bugfix candidate -- although this is getting harder to backstitch, and the
cases it's protecting against are mondo contrived.
2001-06-03 04:54:32 +00:00
Tim Peters fa517b277f Fix comment. 2001-06-02 08:18:58 +00:00
Tim Peters 23cf6be23c Coredumpers from Michael Hudson, mutating dicts while printing or
converting to string.
Critical bugfix candidate -- if you take this seriously <wink>.
2001-06-02 08:02:56 +00:00
Skip Montanaro 951a8841d1 more public symbols for __all__ 2001-06-01 16:25:38 +00:00
Tim Peters 0b76d3a8d1 This division test was too stringent in its accuracy expectations for
random inputs:  if you ran the test 100 times, you could expect it to
report a bogus failure.  So loosened its expectations.
Also changed the way failing tests are printed, so that when run under
regrtest.py we get enough info to reproduce the failure.
2001-05-29 22:18:09 +00:00
Tim Peters 9a828d3c61 BadDictKey test: The output file expected "raising error" to be printed
exactly once.  But the test code can't know that, as the number of times
__cmp__ is called depends on internal details of the dict implementation.
This is especially nasty because the __hash__ method returns the address
of the class object, so the hash codes seen by the dict can vary across
runs, causing the dict to use a different probe order across runs.  I
just happened to see this test fail about 1 run in 7 today, but only
under a release build and when passing -O to Python.  So, changed the test
to be predictable across runs.
2001-05-29 21:14:32 +00:00
Fred Drake e51fe8d0a3 runtest(): When generating output, if the result is a single line with the
name of the test, only write the output file if it already exists (and
    tell the user to consider removing it).  This avoids the generation of
    unnecessary turds.
2001-05-29 17:10:51 +00:00
Fred Drake 4f1e495fa0 The one-line output files are no longer needed, so do not keep them. 2001-05-29 16:54:22 +00:00
Jeremy Hylton bea3947fb8 Variety of test cases for call to builtin functions 2001-05-29 16:26:20 +00:00
Tim Peters 3a2ab1ab69 Whitespace normalization. 2001-05-29 06:06:54 +00:00
Tim Peters 12f21ae07f Patch from Gordon McMillan.
updatecache():  When using imputil, sys.path may contain things other than
strings.  Ignore such things instead of blowing up.
Hard to say whether this is a bugfix or a feature ...
2001-05-29 04:27:01 +00:00
Tim Peters 0c6010be75 Jack Jansen hit a bug in the new dict code, reported on python-dev.
dictresize() was too aggressive about never ever resizing small dicts.
If a small dict is entirely full, it needs to rebuild it despite that
it won't actually resize it, in order to purge old dummy entries thus
creating at least one virgin slot (lookdict assumes at least one such
exists).

Also took the opportunity to add some high-level comments to dictresize.
2001-05-23 23:33:57 +00:00
Guido van Rossum 54a069f271 When Tim untabified this file, his editor accidentally assumed 4-space
tabs.  The title was centered using 8-byte tabs, however, and the
result looked strange.  Fixed this.
2001-05-23 13:24:30 +00:00
Tim Peters f5f6c436c6 Remove test_doctest's expected-output file.
Change test_doctest and test_difflib to pass regrtest's notion of
verbosity on to doctest.
Add explanation for a dozen "new" things to test/README.
2001-05-23 07:46:36 +00:00
Fred Drake a6daad2e55 Update to reflect recent changes to regrtest and the new approaches to
testing using doctest and PyUnit.
2001-05-23 04:57:49 +00:00
Fred Drake 1c48eb74c9 Merge my changes to the offending comment with Guido's changes. 2001-05-23 04:53:44 +00:00
Tim Peters dec4a6143c Remove test_difflib's output file and change test_difflib to stop
generating it.  Since this is purely a doctest, the output file never
served a good purpose.
2001-05-23 01:45:19 +00:00
Guido van Rossum 07f353c560 Removed incorrect comment left over from sgmllib.py. 2001-05-22 23:39:10 +00:00
Fred Drake b8e76a7b3d Remove output files that are no longer needed since the corresponding
tests were moved to PyUnit.
2001-05-22 22:32:24 +00:00
Fred Drake cf99225312 Move the sha tests to PyUnit. 2001-05-22 21:43:17 +00:00
Fred Drake 275dfda633 Convert binhex regression test to PyUnit. We could use a better test
for this.
2001-05-22 21:01:14 +00:00
Fred Drake 5379d05dc3 Convert copy_reg test to PyUnit. 2001-05-22 20:38:44 +00:00
Fred Drake 970a53cb3e Remove unused import. 2001-05-22 20:25:05 +00:00
Fred Drake babd7378a3 Simple conversion to PyUnit -- this test really needs more work! 2001-05-22 20:22:06 +00:00
Fred Drake 64fe52351a Convert dospath test suite to PyUnit, adding a couple more cases for
isabs() (no false results were checked) and splitdrive().
2001-05-22 20:20:49 +00:00
Fred Drake 876dc70b2e Re-write the rfc822 tests to use PyUnit.
Update to reflect using "" as the default value for the second parameter
to the get() method.
2001-05-22 19:38:31 +00:00
Fred Drake 233226e977 Per discussion with Barry, make the default value for both get() and
setdefault() the empty string.  In setdefault(), use + to join the value
to create the entry for the headers attribute so that TypeError is raised
if the value is of the wrong type.
2001-05-22 19:36:50 +00:00
Tim Peters d97422115e Implementing an idea from Guido on the checkins list:
When regrtest.py finds an attribute "test_main" in a test it imports,
regrtest runs the test's test_main after the import.  test_threaded_import
needs this else the cross-thread import lock prevents it from making
progress.  Other tests can use this hack too, but I doubt it will ever be
popular.
2001-05-22 18:28:25 +00:00
Fred Drake bc5619826e Convert time module tests to PyUnit. 2001-05-22 17:02:02 +00:00
Fred Drake d992c2c74d Migrate the strop test to PyUnit. 2001-05-22 16:44:33 +00:00
Tim Peters 6626c1f183 create_message(): When os.link() doesn't exist, make a copy of the msg
instead.  Allows this test to finish on Windows again.
2001-05-22 16:29:01 +00:00
Barry Warsaw 1d099103d8 Application of patch #401842 by Denis S. Otkidach to support
localization of month and day names.
2001-05-22 15:58:30 +00:00
Fred Drake cf71fefa59 Add tests for the new .get() and .setdefault() methods of rfc822.Message
objects.
2001-05-22 15:02:19 +00:00
Fred Drake 0295929280 Added .get() and .setdefault() support to rfc822.Message. 2001-05-22 14:58:10 +00:00
Tim Peters aa222234c0 New test adapted from the ancient Demo/threads/bug.py.
ICK ALERT:  read the long comment block before run_the_test().  It was
almost impossible to get this to run without instant deadlock, and the
solution here sucks on several counts.  If you can dream up a better way,
let me know!
2001-05-22 09:34:27 +00:00
Fred Drake febbe33a49 Remove all files of expected output that contain only the name of the
test; there is no need to store this in a file if the actual test code
does not produce any output.
2001-05-21 21:12:10 +00:00
Fred Drake ae1bb176be If the file containing expected output does not exist, assume that it
contains a single line of text giving the name of the output file.  This
covers all tests that do not actually produce any output in the test code.
2001-05-21 21:08:12 +00:00
Andrew M. Kuchling 0152fbdc7f Fix bug #418369: typo in bdist_rpm 2001-05-21 20:34:38 +00:00
Fred Drake c02bc3e819 Re-write the mailbox test suite to use PyUnit. Cover a lot more ground
for the Maildir mailbox format.  This still does not address other mailbox
formats.
2001-05-21 20:23:21 +00:00
Guido van Rossum 39d345127e parse_declaration(): be more lenient in what we accept. We now
basically accept <!...> where the dots can be single- or double-quoted
strings or any other character except >.

Background: I found a real-life example that failed to parse with
the old assumption: http://www.opensource.org/licenses/jabberpl.html
contains a few constructs of the form <![if !supportLists]>...<![endif]>.
2001-05-21 20:17:17 +00:00
Fred Drake acb117eb11 Update a comment. 2001-05-18 21:50:02 +00:00