summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Test the logic for int(d).Raymond Hettinger2004-07-051-0/+10
|
* * Make the tests independent of the default precision.Raymond Hettinger2004-07-031-0/+7
| | | | * Change the default precision to 28 (to match VB's decimal type).
* Work through several open todos:Raymond Hettinger2004-07-031-7/+23
| | | | | | | | | | | | | | | | | * Added test for pickling contexts * Renamed ExceptionList to Signals (to match wording in the spec) * Simplified Context constructor by allowing flags=None to automatically generate a zeroed-out flags dictionary. * inlined _convertString() which was used only once * _rounding_decision is private, so excluded its contants from __all__. * added an XXX comment with concerns about subclassing signals results in a deviation from the spec (maybe important, maybe not). * Taught the test_suite to determine its own directory (modeled after code in regrtest.py). Enables it to be run when the current directory is not the test directory. * Added a clear_flags() method to the Context API to make it easier to do a common operation with flags. * Fixed the trap_enablers defaults in BasicDefaultContext to match the spec.
* Add tests that check the result of calendar.monthcalendar() for a setWalter Dörwald2004-07-021-1/+79
| | | | of corner cases.
* Make weak references subclassable:Fred Drake2004-07-021-0/+66
| | | | | | | | | | | | | | | | | | | | | | - weakref.ref and weakref.ReferenceType will become aliases for each other - weakref.ref will be a modern, new-style class with proper __new__ and __init__ methods - weakref.WeakValueDictionary will have a lighter memory footprint, using a new weakref.ref subclass to associate the key with the value, allowing us to have only a single object of overhead for each dictionary entry (currently, there are 3 objects of overhead per entry: a weakref to the value, a weakref to the dictionary, and a function object used as a weakref callback; the weakref to the dictionary could be avoided without this change) - a new macro, PyWeakref_CheckRefExact(), will be added - PyWeakref_CheckRef() will check for subclasses of weakref.ref This closes SF patch #983019.
* SF Bug #215126: Over restricted type checking on eval() functionRaymond Hettinger2004-07-022-11/+55
| | | | | | The builtin eval() function now accepts any mapping for the locals argument. Time sensitive steps guarded by PyDict_CheckExact() to keep from slowing down the normal case. My timings so no measurable impact.
* Move Decimal from the sandbox into production.Raymond Hettinger2004-07-011-0/+1
|
* Move Decimal from the sandbox into production.Raymond Hettinger2004-07-0132-1/+23953
|
* Remove unused import. (If it's there for some deep, dark reason, it should ↵Andrew M. Kuchling2004-06-291-1/+0
| | | | have been commented.)
* Add test case for bug #912845: requesting an HTTP byte range doesn't workAndrew M. Kuchling2004-06-291-6/+16
|
* Docstring grammar fixAndrew M. Kuchling2004-06-291-1/+1
|
* Patch from Mark Hammond to fix a test error.Raymond Hettinger2004-06-281-9/+12
| | | | Now runs without exception on WinME/98.
* Added socket.getservbyport(), and make its second argument and that ofBarry Warsaw2004-06-281-10/+22
| | | | getservbyname() optional. Update the tests and the docs.
* * Silence a test failure that resulted when test_site was run byRaymond Hettinger2004-06-271-7/+10
| | | | | | | | | | regrtest.py after it ran test_frozen. This test was really only designed to be run immediately after startup. Afterwards, other modules could be loaded when had not been fixed-up by site.py Took the chicken way out and only tested those modules known to be imported by site.py. * Normalized whitespace.
* Massive performance improvement for C extension and builtin tracing codeNicholas Bastin2004-06-251-3/+3
|
* Bug 975996: Add _PyTime_DoubleToTimet to C APITim Peters2004-06-202-0/+35
| | | | | | | | | | | New include file timefuncs.h exports private API function _PyTime_DoubleToTimet() from timemodule.c. timemodule should export some other functions too (look for painful bits in datetimemodule.c). Added insane-argument checking to datetime's assorted fromtimestamp() and utcfromtimestamp() methods. Added insane-argument tests of these to test_datetime, and insane-argument tests for ctime(), localtime() and gmtime() to test_time.
* shutil.move() will raise an exception when trying to move a directory intoBrett Cannon2004-06-191-2/+14
| | | | | | itself. Closes bug #919012 . Thanks Johannes Gijsbers.
* Reverse argument order for nsmallest() and nlargest().Raymond Hettinger2004-06-151-4/+4
| | | | Reads better when the iterable is a generator expression.
* One unit test for distutils is not much, but is more than we had yesterday.Fred Drake2004-06-151-0/+17
| | | | We need to write more; hopefully the barrier is a little lower now.
* Patch #826074: cmath.log optional base argument, fixes #823209Raymond Hettinger2004-06-141-2/+19
| | | | (Contributed by Andrew Gaul.)
* Add heapq to list of __all__ checks.Raymond Hettinger2004-06-131-0/+1
|
* Install C version of heapq.nsmallest().Raymond Hettinger2004-06-131-6/+19
|
* note a really bad test (no time to fix now)Michael W. Hudson2004-06-121-0/+1
|
* Improve the memory performance and speed of heapq.nsmallest() by usingRaymond Hettinger2004-06-121-0/+1
| | | | | an alternate algorithm when the number of selected items is small relative to the full iterable.
* lightly modified version of my patchMichael W. Hudson2004-06-111-24/+31
| | | | | | [ 971323 ] make test_signal less annoying after some comments on IRC from a highly opinionated australian who wishes to remain anonymous.
* fix a poorly worded error messageAnthony Baxter2004-06-111-1/+1
|
* Convert test_heapq.py to unittests.Raymond Hettinger2004-06-101-86/+90
|
* SF patch #969791: Add nlargest() and nsmallest() to heapq.Raymond Hettinger2004-06-101-1/+10
|
* test_devnull(): Use assertEqual() instead of an assert stmt.Tim Peters2004-06-081-1/+1
|
* Removed test_sitepackages test. Skip discovered that it only passed if PythonBrett Cannon2004-06-081-8/+0
| | | | had already been installed previously.
* Feature request #935915: Add os.path.devnull.Martin v. Löwis2004-06-081-0/+9
|
* SF 952807: Unpickling pickled instances of subclasses of datetime.date,Tim Peters2004-06-071-0/+34
| | | | | | | datetime.datetime and datetime.time could yield insane objects. Thanks to Jiwon Seo for the fix. Bugfix candidate. I'll backport it to 2.3.
* Try to improve test coverage for utime()Neal Norwitz2004-06-061-0/+4
|
* Look for the multibyte codec map files in the parent directory tooNeal Norwitz2004-06-061-2/+7
| | | | | This is similar to test_normalization, so that many source trees can reference the same test file(s).
* add -L flag to cause leaks(1) command to run just before exitSkip Montanaro2004-06-061-2/+13
|
* Remove a number of tests that differ only in input data size. It seemsNeil Schemenauer2004-06-051-161/+59
| | | | | | no bug motivated their inclusion and the chance of them triggering a problem seems unlikely. Refactor to reduce code duplication. Rename 'hamlet_scene' to 'HAMLET_SCENE'. Test is much faster now. Closes #960995.
* Remove lots of magic constants.Neil Schemenauer2004-06-051-23/+38
|
* Rewrote to use temporary files instead of StringIO objects in most places.Skip Montanaro2004-06-051-113/+253
| | | | Goal is to work in the direction of universal newline support.
* [Bug #921657] Allow '@' in unquoted HTML attributes. Not strictly legal ↵Andrew M. Kuchling2004-06-051-0/+4
| | | | according to the HTML REC, but HTMLParser is already a pretty loose parser. Reported by Bernd Zimmermann.
* [Bug #954364] inspect.getframeinfo() sometimes produces incorrect traceback ↵Andrew M. Kuchling2004-06-051-2/+2
| | | | line #s; fix is to look at tb.tb_lineno, not tb.frame.f_lineno. Patch from Robin Becker and me.
* Fix a bug that robotparser starves memory when the server responsesHye-Shik Chang2004-06-051-0/+34
| | | | | in HTTP/0.9 due to dissonance of httplib.LineAndFileWrapper and urllib.addbase.
* [Bug #841757] Exercise handling of Unicode stringsAndrew M. Kuchling2004-06-051-0/+2
|
* Refactored site.py into functions. Also moved over to using sets.Brett Cannon2004-06-051-0/+199
| | | | New regression test suite.
* Reuse width/iswide tests from strings_test. (Suggested by Walter Dörwald)Hye-Shik Chang2004-06-041-21/+2
|
* Fix typo.Hye-Shik Chang2004-06-041-1/+1
|
* Add iswide() and width() method for UserString according as theHye-Shik Chang2004-06-042-1/+27
| | | | addition to unicode objects.
* SF #965425: fix so hyphenated words surrounded by punctuation areGreg Ward2004-06-031-1/+18
| | | | wrapped correctly.
* Rename class attribute containing the class to be tested, so the name is theWalter Dörwald2004-06-025-16/+16
| | | | same as for the string and sequence tests.
* Remove pre moduleAndrew M. Kuchling2004-06-021-3/+0
|
* - SF #962502: Add two more methods for unicode type; width() andHye-Shik Chang2004-06-021-0/+20
| | | | | | | iswide() for east asian width manipulation. (Inspired by David Goodger, Reviewed by Martin v. Loewis) - Move _PyUnicode_TypeRecord.flags to the end of the struct so that no padding is added for UCS-4 builds. (Suggested by Martin v. Loewis)