summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Added tests that conversion to our own timezone is always an identity,Tim Peters2002-12-301-0/+13
| | | | | and that conversion to "timezone" None is the same as stripping the tzinfo member.
* Beefed up the timezone conversion test by adding a phony UTC zone that'sTim Peters2002-12-301-67/+81
| | | | | west of the US zones getting converted, and also by using Eastern "as if" it were UTC (wrt Pacific), and vice versa.
* String tests should test 8-bit strings :-)Marc-André Lemburg2002-12-301-1/+1
|
* Last checkin was missing the tuple comma.Raymond Hettinger2002-12-301-1/+1
| | | | The new "substr in str" feature masked the error.
* Restore the test of the random module after including "Random" in theRaymond Hettinger2002-12-301-1/+1
| | | | | | | | ignore tuple. The line, "from _random import Random as CoreGenerator", fools the test code which expects CoreGenerator.__name__ to be "CoreGenerator" instead of "Random".
* Temporarily comment out a test that crashes upon the introduction ofRaymond Hettinger2002-12-301-1/+1
| | | | the _random subclass for Random.
* This test depends on the exact ordering produced by the WichmannHillRaymond Hettinger2002-12-301-3/+3
| | | | | random number generator. Altered it a bit to use the old generator and restore the test.
* A start at non-trivial (== DST-aware) tests of timezone conversion.Tim Peters2002-12-291-0/+152
| | | | | | | Guido has in mind an easier way for users to code this stuff, but the only tests we have now are for fixed-offset tzinfo classes, and this stuff is extremely delicate in the endcases (read the new test code for why: there are holes in time <wink>).
* SF patch 658251: Install a C implementation of the Mersenne Twister as theRaymond Hettinger2002-12-291-14/+201
| | | | core generator for random.py.
* Patch for bug #659709: bogus computation of float lengthMarc-André Lemburg2002-12-292-0/+51
| | | | | Python 2.2.x backport candidate. (This bug has been around since Python 1.6.)
* Suppress unsafe *Cookie class warningsAndrew M. Kuchling2002-12-291-0/+5
|
* Make comparison and subtraction of aware objects ignore tzinfo if theTim Peters2002-12-271-8/+86
| | | | | | operands have identical tzinfo members (meaning object identity -- "is"). I misunderstood the intent here, reading wrong conclusion into conflicting clues.
* Also skip testHostnameRes() if gethostbyaddr() raises an exception.Guido van Rossum2002-12-261-1/+5
|
* Skip testHostnameRes() if gethostbyname() raises an exception.Guido van Rossum2002-12-261-1/+5
|
* Fix julian day problem with strptime. Note: XXX about using 0, suggestions?Neal Norwitz2002-12-261-0/+12
|
* Added tests to ensure that timetz comparison, and datetimetzTim Peters2002-12-261-9/+67
| | | | | | | | | | | subtraction, work as documented. In the Python implementation, they weren't calling utcoffset() if both operands had the same tzinfo object. That's fine if it so happens that the shared tzinfo object returns a fixed offset (independent of operand), but can give wrong results if that's not so, and the latter obtains in a tzinfo subclass instance trying to model both standard and daylight times. The C implementation was already doing this "correctly", so we're just adding tests to verify it.
* Implemented datetime.astimezone() and datetimetz.astimezone().Tim Peters2002-12-251-0/+53
|
* Whitespace normalization.Tim Peters2002-12-245-9/+8
|
* Add test for SF #658106. Will backport.Neal Norwitz2002-12-241-0/+4
|
* Implemented .replace() methods for date, datetime, datetimetz, time andTim Peters2002-12-241-0/+150
| | | | timetz.
* Don't rebind True and False.Tim Peters2002-12-231-5/+5
|
* I give up: unless I write my own strftime by hand, datetime just can'tTim Peters2002-12-221-0/+6
| | | | | | be trusted with years before 1900, so now we raise ValueError if a date or datetime or datetimetz .strftime() method is called with a year before 1900.
* Implemented a Wiki suggestion:Tim Peters2002-12-221-71/+118
| | | | | | | | | | | | {timetz,datetimetz}.{utcoffset,dst}() now return a timedelta (or None) instead of an int (or None). tzinfo.{utcoffset,dst)() can now return a timedelta (or an int, or None). Curiously, this was much easier to do in the C implementation than in the Python implementation (which lives in the Zope3 code tree) -- the C code already had lots of hair to extract C ints from offset objects, and used C ints internally.
* Added test to ensure that non-string result from dst() raises TypeError.Tim Peters2002-12-211-0/+6
|
* Changes sufficient so that pickles written by the Python implementationTim Peters2002-12-211-9/+15
| | | | can be read by the C implementation. I don't really understand this.
* format_utcoffset(): The natural type of the buflen arg is size_t, soTim Peters2002-12-201-9/+16
| | | | | | | | | | used that. wrap_strftime(): Removed the most irritating uses of buf. TestDate.test_ordinal_conversions(): The C implementation is fast enough that we can afford to check the endpoints of every year. Also added tm_yday tests at the endpoints.
* Expand log() tests to include long integers.Raymond Hettinger2002-12-181-0/+2
|
* This is Richie Hindle's patchMichael W. Hudson2002-12-171-0/+289
| | | | | | | | [ 643835 ] Set Next Statement for Python debuggers with a few tweaks by me: adding an unsigned or two, mentioning that not all jumps are allowed in the doc for pdb, adding a NEWS item and a note to whatsnew, and AuCTeX doing something cosmetic to libpdb.tex.
* Made this a little more compatible w/ the sandbox version, which isTim Peters2002-12-161-2/+2
| | | | still needed to test the Python implementatino.
* datetime escapes the sandbox. The Windows build is all set. I leave itTim Peters2002-12-161-0/+2128
| | | | | to others to argue about how to build it on other platforms (on Windows it's in its own DLL).
* Apply SF patch 652930: Add optional base argument to math.log(x[, base]).Raymond Hettinger2002-12-141-0/+1
|
* Tighten the tests for assignment to __bases__: disallow empty tuple.Guido van Rossum2002-12-131-0/+8
|
* Patch #536661: Improve performance of splitext. Add test_macpath.Martin v. Löwis2002-12-123-0/+79
|
* Patch #650653: Raise always value error if the table is not 256 bytes long.Martin v. Löwis2002-12-121-0/+2
|
* Change issubclass() so that recursive tuples (directly or indirectlyWalter Dörwald2002-12-121-1/+18
| | | | | | containing class objects) are allowed as the second argument. This makes issubclass() more similar to isinstance() where recursive tuples are allowed too.
* Patch #551960: Add check for setrlimit() supportJason Tishler2002-12-121-4/+12
| | | | | | | | | | test_resource calls resource.setrlimit() to change the file size limits. This fails on Cygwin, which supports setrlimit() and getrlimit(), just not changing that particular setting. (The same would apply to any other platform that has those functions but not that particular feature.) Since getrlimit() works and setrlimit() can be used for other reasons, a check for ValueError was added to that part of the test.
* Enhance issubclass() and PyObject_IsSubclass() so that a tuple isWalter Dörwald2002-12-121-0/+9
| | | | | | | | | | | supported as the second argument. This has the same meaning as for isinstance(), i.e. issubclass(X, (A, B)) is equivalent to issubclass(X, A) or issubclass(X, B). Compared to isinstance(), this patch does not search the tuple recursively for classes, i.e. any entry in the tuple that is not a class, will result in a TypeError. This closes SF patch #649608.
* Clean-up test class for DictMixin.Raymond Hettinger2002-12-111-2/+6
|
* Added test_ossaudiodev to expected skips on Windows.Tim Peters2002-12-101-0/+1
|
* Aesthetic tweakery: factor read_sound_file() out of play_sound_file().Greg Ward2002-12-101-5/+9
|
* Initial revision is rev 1.8 of test_linuxaudiodev.py, withGreg Ward2002-12-101-0/+89
| | | | the obvious s/linuxaudiodev/ossaudiodev/ change made.
* SF 548651: Fix the METH_CLASS implementation.Tim Peters2002-12-091-4/+4
| | | | | | | Most of these patches are from Thomas Heller, with long lines folded by Tim. The change to test_descr.py is from Guido. See the bug report. Not a bugfix candidate -- METH_CLASS is new in 2.3.
* Add test_unicode() to ensure that 1) textwrap doesn't crash on unicodeGreg Ward2002-12-091-0/+12
| | | | | input, and 2) unicode input means unicode output. This closes SF bug #622831.
* Added test_initial_whitespace() to ensure that SF bug #622849 is fixed.Greg Ward2002-12-091-3/+13
| | | | | | Change LongWordTestCase.setUp() -- remove leading whitespace from text string. Comment fix.
* Add support for binary pickles to the shelve module. In some situationsSkip Montanaro2002-12-081-0/+51
| | | | | | | | this can result in significantly smaller files. All classes as well as the open function now accept an optional binary parameter, which defaults to False for backward compatibility. Added a small test suite, updated the libref documentation (including documenting the exported classes and fixing a few other nits) and added a note about the change to Misc/NEWS.
* Add another test which exercises the whole suite with aRaymond Hettinger2002-12-071-0/+14
| | | | heapsort and verifies the result against list.sort().
* Fix typo in abstract.c which caused __rpow__ to not be invoked.Raymond Hettinger2002-12-071-0/+5
| | | | | Added related testcase. Closes SF bug #643260.
* Cleaned up test (removing bogus argument list).Raymond Hettinger2002-12-071-2/+2
|
* Remove assumption that cls is a subclass of dict.Raymond Hettinger2002-12-071-3/+3
| | | | Simplifies the code and gets Just van Rossum's example to work.
* The final tweaks before closingMichael W. Hudson2002-12-051-0/+4
| | | | | | [ 633152 ] list slice ass ignores subtypes of list Allow arbitrary sequences on the RHS of extended slices.