Commit Graph

8512 Commits

Author SHA1 Message Date
Tim Peters 5943b4ac10 Restored commented-out line checked in by mistake. 2003-07-23 00:30:39 +00:00
Tim Peters 9390dd5b4a locale-restoration code: Don't leave comparison to None implicit. For
all I know, the original locale may be '' (I don't think that's possible,
but ...), and if so we would certainly want to restore it.
2003-07-23 00:30:11 +00:00
Tim Peters 36f7e938f2 Fred wasn't kidding -- there really are docs for the locale module <wink>.
Obtain the original locale in the documented way.  This way actually
works for me.

Restore the original locale at the end, instead of forcing to "C".

Move the locale fiddling into the test driver instead of doing it as a
side effect of merely importing the module.  I don't know why the test
is mucking with locale (and also added a comment saying so), but it
surely has no justification for doing that as an import side-effect.
Now whenever the locale-changing code executes, the locale-restoring code
will also get run.
2003-07-23 00:05:07 +00:00
Brett Cannon d1deac06e7 Fix error in test of not comparing against 0 item of a list 2003-07-22 21:07:16 +00:00
Jason Tishler c23f39ca9d Patch #775784: YA Cygwin expected regression test skip patch
This patch just adds test_ioctl to the list of expected skips for Cygwin.
2003-07-22 18:35:58 +00:00
Thomas Heller 354e3d90d3 Change the zipimport implementation to accept files containing
arbitrary bytes before the actual zip compatible archive.  Zipfiles
containing comments at the end of the file are still not supported.

Add a testcase to test_zipimport, and update NEWS.

This closes sf #775637 and sf #669036.
2003-07-22 18:10:15 +00:00
Skip Montanaro 5d6ceb4aae more generic reference to python interpreter 2003-07-22 14:37:42 +00:00
Tim Peters 291f14e3d3 Windows fix: When PYTHONCASEOK is set, or for any other reason imports
are satisfied in a case-insensitive manner, the attempt to import (the
non-existent) fcntl gets satisfied by FCNTL.py instead, and the tempfile
module defines a Unix-specific _set_cloexec() function in that case.  As
a result, temp files can't be created then (blows up with an AttributeError
trying to reference fcntl.fcntl).  This just popped up in the spambayes
project, where there is no apparent workaround (which is why I'm pushing
this in now).
2003-07-22 02:50:01 +00:00
Barry Warsaw e3ea281280 readerThread(): Add max_retries to both DeadlockWrap() calls. This
may cause some tests to fail but it prevents them from hanging.
2003-07-21 23:01:34 +00:00
Jack Jansen 749f481478 Backport from r23c1-branch:
Pimp crashed if you tried to install a non-installable package, in stead
of printing a decent error message. Fixes #773450..
2003-07-21 20:47:11 +00:00
Barry Warsaw e676c5ef3e test01_join(): Fix a test failure when run with "python -O". The
setting of sCursor happened in an assert.
2003-07-21 18:43:33 +00:00
Jeremy Hylton 6d58bf69ee Repair operator error. 2003-07-18 17:45:33 +00:00
Jeremy Hylton bdf3b509ed SF patch 773476: NameError when there are no prefixes. 2003-07-18 17:24:07 +00:00
Just van Rossum a920a8895e up the b/w compatibility requirement to 2.2 2003-07-18 15:31:40 +00:00
Jeremy Hylton 969a7003f9 Make sure mimetypes is reinitialized before running the tests.
If some other test comes along and uses mimetypes, it will be
initialized from the system files.
2003-07-18 15:13:37 +00:00
Jeremy Hylton 096d986f3b Restore the locale to "C" on exit.
If this doesn't happen, it leaves the locale in a state that can cause
other tests to fail.  For example, running test_strptime,
test_logging, and test_time in that order.
2003-07-18 03:19:20 +00:00
Jeremy Hylton bd9f520907 Reflow long line. 2003-07-17 16:31:00 +00:00
Just van Rossum 2d4e988c35 back out the darwin supports_unicode_filenames patch; it causes deep problems with the tests 2003-07-17 15:11:49 +00:00
Jeremy Hylton e9a92aa03a Patch from John Anderson to enable VC 7.1 support.
I tested against VC 7.0 and it caused no problems there.
2003-07-17 14:41:07 +00:00
Raymond Hettinger 71adf7e9d8 Doctest now examines all docstrings by default. Previously, it would
skip over functions with private names (as indicated by the underscore
naming convention).  The old default created too much of a risk that
user tests were being skipped inadvertently.  Note, this change could
break code in the unlikely case that someone had intentionally put
failing tests in the docstrings of private functions.  The breakage
is easily fixable by specifying the old behavior when calling testmod()
or Tester().  The more likely case is that the silent failure was
unintended and that the user needed to be informed so the test could be
fixed.
2003-07-16 19:25:22 +00:00
Raymond Hettinger 43d790c087 Exercise Jim Fulton's new doctest extension for running doctests in a
unittest environment.  Since his extension finds docstrings in private
functions, it exposed a bug in the difflib doctests.
2003-07-16 04:34:56 +00:00
Raymond Hettinger 83325e9087 Fix faulty doctests. There is no results attribute.
Note, these tests were not getting exercised because
doctest skips over private functions.
2003-07-16 04:32:32 +00:00
Raymond Hettinger f3590623e9 Extend last change to cover TestSuites as well as TestCases. 2003-07-16 04:29:42 +00:00
Mark Hammond bb4a47c818 Prevent failure on the mac, where "mbcs" is not the file system
encoding.  Use sys.getfilesystemencoding().
2003-07-16 03:46:38 +00:00
Kurt B. Kaiser cca912279a Update to reflect the current status of the configuration system.
Extensions must still be configured manually and there is currently one
set of extension key bindings for all platforms.

Bring NEWS.txt up to date.

Update CREDITS.txt and idlever.py for release.

M NEWS.txt
M config-extensions.def
M extend.txt
M help.txt
M idlever.py
2003-07-16 03:10:43 +00:00
Raymond Hettinger 21d9987cb5 run_unittest() to support TestCase instances as well as classes. Helps with doctests. 2003-07-16 02:59:32 +00:00
Raymond Hettinger 19db13bcc7 Fixed test and converted to unittest format.
Checking // would call floor division but did not test that
true division had become the default with 'from __future__ import division'.
2003-07-15 21:03:13 +00:00
Raymond Hettinger 158af581ae Fixed test and converted to unittest format.
Checking // would call floor division but did not test that
true division had become the default with 'from __future__ import division'.
2003-07-15 20:57:35 +00:00
Jeremy Hylton 42d90161e2 SF patch 763201: handling of SyntaxErrors in symbol table build
Bug fix candidate.
2003-07-15 20:24:27 +00:00
Walter Dörwald f393fc6e51 Add various test cases from SF patch 543867. 2003-07-15 18:47:27 +00:00
Walter Dörwald c171172614 Make the prefix 7 spaces long, so the lines are properly aligned. 2003-07-15 10:34:02 +00:00
Fred Drake f425b1ec42 stylistic nits:
- wrap some long lines
- shorten others
- fix indentation
2003-07-14 21:37:17 +00:00
Skip Montanaro 6d06815b56 Give dumbdbm a sync() method which Shelve can call. Should solve some
database corruption problems with Spambayes.
2003-07-14 12:15:15 +00:00
Raymond Hettinger 92f200b569 SF bug #770601: CGIHTTPServer and environment variables (bug + solution)
(contributed by Vincent Delft.)

The script updated os.environ but failed to pass the whole environment
to the child process (the CGI script).
2003-07-14 06:56:32 +00:00
Tim Peters 7a6c733c3b Make close() identical to __del__() for a dumbdbm database. Make
closing idempotent (it used to raise a nuisance exception on the 2nd
close attempt).

Bugfix candidate?  Probably, but arguable.
2003-07-13 17:21:10 +00:00
Raymond Hettinger 4a4296ec29 SF patch #765238: fix fnmatch.__all__
(Contributed by George Yoshida.)
2003-07-13 16:06:26 +00:00
Skip Montanaro ae5c37b7b3 delete unused local variable (pychecker caught) 2003-07-13 15:18:12 +00:00
Raymond Hettinger 61bfb736b4 SF bug #769142: CallTip trimming may loop forever.
Needs to be backported to both IDLE and IDLEFORK.
2003-07-13 10:25:14 +00:00
Raymond Hettinger d6f6e50c9b Reworked test_warnings.py:
* It ran fine under "python regrtest.py test_warnings" but failed under
  "python regrtest.py" presumably because other tests would add to
  filtered warnings and not reset them at the end of the test.

* Converted to a unittest format for better control.  Renamed
  monkey() and unmonkey() to setUp() and tearDown().

* Increased coverage by testing all warnings in __builtin__.

* Increased coverage by testing regex matching of specific messages.
2003-07-13 08:37:40 +00:00
Raymond Hettinger dc9dcf135e This test failed on WindowsME because the full file path did not get
reported consistently with the *nix world.  'Lib/test/test_warnings.py'
came out as 'lib\test\test_warnings.py'.  The basename is all we care
about so I used that.
2003-07-13 06:15:11 +00:00
Tim Peters 0320464583 Repaired typos in comments. 2003-07-13 02:37:05 +00:00
Tim Peters d7472ec13a Fixed critical shutdown race in _Database._commit.
Related to SF patch 723231 (which pointed out the problem, but didn't
fix it, just shut up the warning msg -- which was pointing out a dead-
serious bug!).

Bugfix candidate.
2003-07-13 02:22:03 +00:00
Tim Peters 1d8d729af8 More comments about why not closing a dumddbm properly can be a disaster. 2003-07-13 02:05:47 +00:00
Raymond Hettinger 4a6302b6fe SF 748201: time.strptime() should display format and date on error
Usability fix.  Makes the error message more helpful.
2003-07-13 01:31:38 +00:00
Tim Peters 3898a70bcf _commit(): Modernization. 2003-07-12 20:23:09 +00:00
Tim Peters 7dfd5701b2 There's a persistent rumor on the spambayes mailing list that dumbdbm
databases are associated with corruption problems, so I studied this code
carefully and ran some brutal stress tests.  I didn't find any bugs,
although it's unclear whether this code *intends* that __setitem__ can
leave the directory file out of synch with the data file (so
if a dumbdbm isn't properly closed, and the value of an existing key
was ever replaced, corruption is almost certain, where "corruption"
means the directory file is out of synch with the data file).

Added many comments and generally modernized the code.  Examples of the
latter:  we have better ways of reading a whole file line-by-line now;
eval() now tolerates a trailing newline; the %r format code can be used
to avoid explicit repr/backtick calls; and the code often broke tuples
into their components when it was clearer and faster to just leave them
as tuples.
2003-07-12 20:11:25 +00:00
Martin v. Löwis 541342f82c Patch #764470: Fix marshalling of faults. Will backport to 2.2. 2003-07-12 07:53:04 +00:00
Martin v. Löwis 162f081fb3 Patch 549151, rev4: redirect posts for 301 also. Will backport to 2.2. 2003-07-12 07:33:32 +00:00
Raymond Hettinger cc39a13d6d Expose the 'master' instance mentioned in the docs. 2003-07-11 22:36:52 +00:00
Jeremy Hylton b6d2f3e07d Don't include slash in search string; it's OS-specific. 2003-07-11 20:22:55 +00:00