Commit Graph

2410 Commits

Author SHA1 Message Date
Raymond Hettinger 83245b5828 SF bug #699934: Obscure error message
Clarify error message for mro conflicts.
2003-03-12 04:25:42 +00:00
Jack Jansen dded84802a Allow unicode pathnames where FSRefs are expected. Fixes 696253. 2003-03-11 21:48:57 +00:00
Guido van Rossum 315aa361fc Add 'audio' resource.
ALERT! A month ago or so I made test_ossaudiodev.py require the
'audio' resource, but I didn't make the necessary changes to
regrtest.py.  This means that *nobody* has been testing the oss module
all that time!
2003-03-11 14:46:48 +00:00
Raymond Hettinger 1fdb633530 SF patch #691928: Use datetime in _strptime
Contributed by Brett Cannon.

To prevent code duplication, I patched _strptime to use datetime's date
object to do Julian day, Gregorian, and day of the week calculations.

Patch also includes new regression tests to test results and the
calculation gets triggered.

Very minor comment changes and the contact email are also changed.
2003-03-09 07:44:42 +00:00
Raymond Hettinger 2c2d322884 SF patch #667730: More DictMixin
* Adds missing pop() methods to weakref.py
* Expands test suite to broaden coverage of objects with
  a mapping interface.

Contributed by Sebastien Keim.
2003-03-09 07:05:43 +00:00
Martin v. Löwis c49435c991 Skip the test if TESTFN_ENCODING is None. Fixes #699386. 2003-03-08 10:25:31 +00:00
Tim Peters 61cd0db3d2 Don't quote the path to Python unless the path contains an embedded space.
Quoting the path doesn't work on Win2K (cmd.exe) regardless, this is just
a hack to let the test pass again on Win2K (so long as Python isn't
installed in a path that does contain an embedded space).  On Win2K it
looks like we'd also have to add a second pair of double quotes, around
the entire command line.
2003-03-07 21:10:21 +00:00
Tim Peters 669454e9dc Whitespace normalization. 2003-03-07 17:30:48 +00:00
Tim Peters eabafebfbc This test relied on significant trailing whitespace in a string literal.
Evil.
2003-03-07 15:55:36 +00:00
Jack Jansen c4d6bdd58a Test_ioctl and test_tarfile are skipped on MacOS9. 2003-03-07 15:38:11 +00:00
Jack Jansen 149a8993b0 The filename fix of the previous checkin was complete bogus, the problem is elsewhere. Retracting. 2003-03-07 13:27:53 +00:00
Jack Jansen c7fcc2d772 Two fixes to make this test pass on MacOS9:
- the test was sloppy about filenames: "0-REGTYPE-TEXT" was used where
  the archive held "/0-REGTYPE-TEXT".
- tarfile extracts all files in binary mode, but the test expected to be able to
  read and compare text files in text mode. Use universal text mode.
2003-03-07 12:50:45 +00:00
Raymond Hettinger a3e1e4cd79 SF patch #693753: fix for bug 639806: default for dict.pop
(contributed by Michael Stone.)
2003-03-06 23:54:28 +00:00
Martin v. Löwis 73d538b9c6 Always initialize Py_FileSystemDefaultEncoding on Unix in Py_Initialize,
and not as a side effect of setlocale. Expose it as sys.getfilesystemencoding.
Adjust test case.
2003-03-05 15:13:47 +00:00
Tim Peters fd8e6e5990 test_ioctl is an expected skip on Windows. 2003-03-04 00:26:38 +00:00
Michael W. Hudson f008998668 Fix bug
[ 555817 ] Flawed fcntl.ioctl implementation.

with my patch that allows for an array to be mutated when passed
as the buffer argument to ioctl() (details complicated by
backwards compatibility considerations -- read the docs!).
2003-03-03 12:29:42 +00:00
Guido van Rossum 206b9a779a MyComplex now works. 2003-03-02 13:53:18 +00:00
Tim Peters fc27375d5a test_load_from_canned_string(): Created a DATA2 string to test a canned
proto 2 pickle too.
2003-03-02 04:54:24 +00:00
Tim Peters 6cca754c20 TestOnlySetsInBinaryOps: Simplified the non-inplace tests by using
assertRaises.  Fixed a repeated subtle bug in the inplace tests by
removing the possibilty that a self.fail() call could raise a
TypeError that the test catches by mistake.
2003-03-02 00:36:10 +00:00
Tim Peters b7bfe4bea4 Typo repairs in new code. 2003-03-02 00:31:23 +00:00
Tim Peters 44f14b0399 SF bug 693121: Set == non-Set is a TypeError.
Allow mixed-type __eq__ and __ne__ for Set objects.  This is messier than
I'd like because Set *also* implements __cmp__.  I know of one glitch now:
cmp(s, t) returns 0 now when s and t are both Sets and s == t, despite
that Set.__cmp__ unconditionally raises TypeError (and by intent).  The
rub is that __eq__ gets tried first, and the x.__eq__(y) True result
convinces Python that cmp(x, y) is 0 without even calling Set.__cmp__.
2003-03-02 00:19:49 +00:00
Tim Peters 3ba491e6b1 The doctest was printing Sets, but that's unreliable because set
elements get displayed in undefined dict order.  Use a Set subclass
instead (which arranges to sort the elements for display).
2003-03-01 23:33:34 +00:00
Guido van Rossum d6473d1ac5 Reindent the new code properly. 2003-03-01 03:25:41 +00:00
Guido van Rossum 46d3dc37e4 - New function sys.exc_clear() clears the current exception. This is
rarely needed, but can sometimes be useful to release objects
  referenced by the traceback held in sys.exc_info()[2].  (SF patch
  #693195.)  Thanks to Kevin Jacobs!
2003-03-01 03:20:41 +00:00
Neal Norwitz 55b61d21d8 Fix SF bugs #692951 and 692988, test_timeout.py needs 'network' resource
require -u network to run test_timeout since
it fails when not connected to a network.
2003-02-28 19:57:03 +00:00
Jack Jansen 98fc683719 Getting rid of macfs. 2003-02-27 23:18:46 +00:00
Skip Montanaro add0ccc251 simple test case for dis module 2003-02-27 21:27:07 +00:00
Guido van Rossum 68468eba63 Get rid of many apply() calls. 2003-02-27 20:14:51 +00:00
Guido van Rossum f389c77273 Use floor division (// and __[r]floordiv__ in right-dispatch test. 2003-02-27 20:04:19 +00:00
Guido van Rossum f359410ce2 Use floor division (//). 2003-02-27 18:39:18 +00:00
Fred Drake 479d280218 The macfs, macostools, and plistlib should not be expected to run
beyond Mac OS and Darwin.  I'm not even sure they should be run on
Darwin, but I'll let someone more knowledgable on that tell us.
2003-02-26 19:51:23 +00:00
Walter Dörwald 37c4728c64 Port test_ucn and test_unicodedata to PyUnit. Add a few tests for error
cases increasing coverage in unicodedata.c from 87% to 95%
(when the normalization tests are run). From SF patch #662807.
2003-02-26 14:49:41 +00:00
Jack Jansen 838e76af2c Test suite for the plistlib module. 2003-02-25 12:58:58 +00:00
Jack Jansen 0c44c0477b sys.executable can contain spaces, cater for this when passing it to
os.popen(). Fixes #692222.
2003-02-24 15:26:39 +00:00
Guido van Rossum 577fb5a1db Fix from SF patch #633359 by Greg Chapman for SF bug #610299:
The problem is in sre_compile.py: the call to
    _compile_charset near the end of _compile_info forgets to
    pass in the flags, so that the info charset is not compiled
    with re.U. (The info charset is used when searching to find
    the first character at which a match could start; it is not
    generated for patterns beginning with a repeat like '\w{1}'.)
2003-02-24 01:18:35 +00:00
Neal Norwitz 15ff0e9342 Get test to work on alpha 2003-02-23 23:15:26 +00:00
Neal Norwitz d5a65a77cf Fix SF bug #689659, 64-bit int and long hash keys incompatible
On a 64-bit machine, a dictionary could contain duplicate int/long keys
if the value was > 2**32.
2003-02-23 23:11:41 +00:00
Jack Jansen c2dd2f0966 Expect to skip test_iconv_codecs on MacOSX. 2003-02-23 22:56:58 +00:00
Neal Norwitz 71b13e8b4c Fix SF bug #690081, test_posix fails when run in non-interactive mode
Don't bother testing os.getlogin() if we aren't running from a tty (terminal)
It fails when run without a tty (e.g., when run from cron).
2003-02-23 22:12:24 +00:00
Raymond Hettinger 61fe64d5de User requested changes to the itertools module.
Subsumed times() into repeat().
Added cycle() and chain().
2003-02-23 04:40:07 +00:00
Jack Jansen 5bb97e66dc Checking mac-specific stuff from the 2.3a2 branch in on the trunk. 2003-02-21 22:33:55 +00:00
Tim Peters 7107a7fbcc SF bug 690622: test_cpickle overflows stack on MacOS9.
test_nonrecursive_deep():  Reduced nesting depth to 60.

Not a bugfix candidate.  2.3 increased the number of stack frames
needed to pickle a list (in order to get implement the "list
batching" unpickling memory optimization new in 2.3).
2003-02-21 20:14:35 +00:00
Tim Peters 14821c5914 Doubled TimeoutTestCase.fuzz, to slash the frequency of bogus failures
on the boxes I use.
2003-02-21 16:45:41 +00:00
Walter Dörwald 0fd583ce4d Port all string tests to PyUnit and share as much tests
between str, unicode, UserString and the string module
as possible. This increases code coverage in stringobject.c
from 83% to 86% and should help keep the string classes
in sync in the future. From SF patch #662807
2003-02-21 12:53:50 +00:00
Raymond Hettinger 785d0a37e5 SF bug #690083: test_random fails sometimes
time.sleep(1) sometimes delays for fractionally less than a second
resulting in too short of an interval for C's time.time() function
to create a distinct seed.
2003-02-21 01:41:36 +00:00
Tim Peters 3b5de4db92 Reverted whitespace normalization on this file. I should really change
this thing so it doesn't rely on being unnormalized.  (That's the
editorial "I", if anyone's listening <wink>.)
2003-02-19 02:44:12 +00:00
Tim Peters 8266af4f06 Removed debugging print in test_tarfile.
In the Windows installer, continued the endless battle to copy over files
with new one-shot extensions.
2003-02-19 02:41:44 +00:00
Tim Peters f2715e0764 Whitespace normalization. 2003-02-19 02:35:07 +00:00
Guido van Rossum e690883ccf Use __reduce_ex__ in copy.py. The test_*copy_cant() tests are simpler again. 2003-02-19 01:19:28 +00:00
Guido van Rossum 2a30b21f64 Three test cases for __reduce_ex__. This fails for cPickle, until Tim
checks in his changes to support this in cPickle.c.
2003-02-18 22:41:24 +00:00