summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Test that True can be copied.Martin v. Löwis2003-01-261-0/+4
|
* Patch #670715: Universal Unicode Codec for POSIX iconv.Martin v. Löwis2003-01-261-0/+3
|
* Patch #636005: Filter unicode into unicode.Martin v. Löwis2003-01-251-0/+6
|
* Synchronize with PyXML's 1.33: Import missing modules.Martin v. Löwis2003-01-251-3/+6
|
* Merge PyXML 1.11-1.26:Martin v. Löwis2003-01-251-24/+732
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-arrange the imports into "Python normal form." Add test of the getUserData() / setUserData() methods, including the NODE_CLONED callback. Added support for renameNode() and getInterface(). Changed Node.unlink() so an unlinked node is not rendered completely unusable by setting childNodes to None. Element.removeAttributeNode() is slightly less destructive. Added test for the wholeText attribute. Added a test for Text.replaceWholeText(). Fixed to properly create Element in test of user data Rename a local variable so it makes sense when viewed as a sequence. Unlink a few documents when we're done with them. Added tests to define the behavior of the cloneNode() and importNode() mehods, especially in the "difficult" cases of document and document-type nodes. Filled in a few more of the other cloneNode() tests. NodeList.item() does not exist before Python 2.2, since it requires being able to create subtypes of list. Use the subscript syntax instead. Added a test that minidom documents can be pickled and unpickled. Closes SF bug #609641. Fill in an empty test, making sure we get the whitespace right for the data attribute of a processing instruction. Added checks for a few more invariants for processing instructions. testProcessingInstruction(): The length attribute of the NodeList interface is not implemented for Python 2.0, 2.1, so only use len() to test the length. testSchemaType(): New test, testing just the minimum of schemaType support; this is different from the test_xmlbuilder version of the test since it doesn't rely on using a specific builder, and the builders support different levels of DTD support. Add tests for the removeNamedItem() and removeNamedItemNS() methods of the NamedNodeMap instances found on Element nodes. These do not pass; the fix will be committed shortly. Added support for the DOM Level 3 (draft) Element.setIdAttribute*() methods. Do more to avoid creating new Attr nodes, so that attributes do not lose their ID-ness when set using setIdAttribute*().
* date and datetime comparison: when we don't know how toTim Peters2003-01-241-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | compare against "the other" argument, we raise TypeError, in order to prevent comparison from falling back to the default (and worse than useless, in this case) comparison by object address. That's fine so far as it goes, but leaves no way for another date/datetime object to make itself comparable to our objects. For example, it leaves Marc-Andre no way to teach mxDateTime dates how to compare against Python dates. Discussion on Python-Dev raised a number of impractical ideas, and the simple one implemented here: when we don't know how to compare against "the other" argument, we raise TypeError *unless* the other object has a timetuple attr. In that case, we return NotImplemented instead, and Python will give the other object a shot at handling the comparison then. Note that comparisons of time and timedelta objects still suffer the original problem, though.
* A very minimal start to a test of the shutil module.Barry Warsaw2003-01-241-0/+28
|
* SF bug 660872: datetimetz constructors behave counterintuitively (2.3a1).Tim Peters2003-01-231-1/+15
| | | | | | This gives much the same treatment to datetime.fromtimestamp(stamp, tz) as the last batch of checkins gave to datetime.now(tz): do "the obvious" thing with the tz argument instead of a senseless thing.
* Reimplemented datetime.now() to be useful.Tim Peters2003-01-231-2/+20
|
* Fix for SF bug 661340: test_httplib fails on the mac.Jeremy Hylton2003-01-232-41/+65
| | | | The test no longer produces output with \r\n in it.
* Bringing the code and test suite into line with doc and NEWS changesTim Peters2003-01-231-28/+90
| | | | | | | | | | | | | | | | | | | | checked in two days agao: Refactoring of, and new rules for, dt.astimezone(tz). dt must be aware now, and tz.utcoffset() and tz.dst() must not return None. The old dt.astimezone(None) no longer works to change an aware datetime into a naive datetime; use dt.replace(tzinfo=None) instead. The tzinfo base class now supplies a new fromutc(self, dt) method, and datetime.astimezone(tz) invokes tz.fromutc(). The default implementation of fromutc() reproduces the same results as the old astimezone() implementation, but tzinfo subclasses can override fromutc() if the default implementation isn't strong enough to get the correct results in all cases (for example, this may be necessary if a tzinfo subclass models a time zone whose "standard offset" (wrt UTC) changed in some year(s), or in some variations of double-daylight time -- the creativity of time zone politics can't be captured in a single default implementation).
* Fix from Vinaj for the "writing to closed file" errors. SF 670390.Guido van Rossum2003-01-212-11/+14
|
* New rule for tzinfo subclasses handling both standard and daylight time:Tim Peters2003-01-201-20/+27
| | | | | | | | | | | | When daylight time ends, an hour repeats on the local clock (for example, in US Eastern, the clock jumps from 1:59 back to 1:00 again). Times in the repeated hour are ambiguous. A tzinfo subclass that wants to play with astimezone() needs to treat times in the repeated hour as being standard time. astimezone() previously required that such times be treated as daylight time. There seems no killer argument either way, but Guido wants the standard-time version, and it does seem easier the new way to code both American (local-time based) and European (UTC-based) switch rules, and the astimezone() implementation is simpler.
* Add comments and remove duplicate tests.Walter Dörwald2003-01-201-26/+34
|
* Port test_userdict.py to PyUnit. From SF patch #662807,Walter Dörwald2003-01-191-193/+233
| | | | with additional tests for setdefault(), pop() and popitem().
* Port test_unicode.py to PyUnit and add tests for errorWalter Dörwald2003-01-192-872/+1039
| | | | | | cases and a few methods. This increases code coverage in Objects/unicodeobject.c from 81% to 85%. (From SF patch #662807)
* Combine test_b1.py and test_b2.py into test_builtin.py,Walter Dörwald2003-01-194-1104/+1075
| | | | | | | | port the tests to PyUnit and add many tests for error cases. This increases code coverage in Python/bltinmodule.c from 75% to 92%. (From SF patch #662807, with assert_(not fcmp(x, y)) replaced with assertAlmostEqual(x, y) where possible)
* SF patch #670423: Add missing identity tests to operator.cRaymond Hettinger2003-01-181-0/+11
|
* SF patch 670012: Compatibility changes for _strptime.py.Tim Peters2003-01-181-47/+38
| | | | | | | | | | | | | | | Patch from Brett Cannon: First, the 'y' directive now handles [00, 68] as a suffix for the 21st century while [69, 99] is treated as the suffix for the 20th century (this is for Open Group compatibility). strptime now returns default values that make it a valid date ... the ability to pass in a regex object to use instead of a format string (and the inverse ability to have strptime return a regex object) has been removed. This is in preparation for a future patch that will add some caching internally to get a speed boost.
* * Migrate sample distribution test from random.py to test_random.py.Raymond Hettinger2003-01-171-5/+22
| | | | * Use Sets module to more clearly articulate a couple of tests.
* Let test_random cover the endpoints.Raymond Hettinger2003-01-161-9/+20
| | | | | Strengthen slicing tests. Improved variable names.
* Test optional slice arguments.Raymond Hettinger2003-01-161-4/+14
| | | | Add backwards compatibility test.
* Added doctest for examples in the library reference.Raymond Hettinger2003-01-161-0/+60
| | | | Added random test from bisect to augment the finite precomputed checks.
* Convert to unittest format so that more tests can be added cleanly.Raymond Hettinger2003-01-161-118/+127
|
* This test previously failed when run from the 'test' directory. In thatMark Hammond2003-01-161-5/+7
| | | | | | | | case, the test module created is actually a sub-package of 'test', thus the module is named 'test.areallylongpackage...' - this caused failure. Replace the hard-coded module names with __name__ attributes, which correctly reflects any hierarchy.
* On Mac OS X calling setlocale will raise locale.Error. This isn't fatal,Jack Jansen2003-01-151-1/+2
| | | | so just continue testing. Fixes #668787.
* * Add test for __cmp__()Raymond Hettinger2003-01-151-2/+40
| | | | * Add doctest for example in the library reference manual
* A new test here was failing on Windows, because the test before it neverTim Peters2003-01-131-10/+5
| | | | | managed to delete the @test file it intended to delete. Also, I don't see a reason to create a 4MB file in the new test, so cut it back to 16K.
* Fix SF bug #667147, Segmentation fault printing str subclassNeal Norwitz2003-01-131-1/+24
| | | | | | | Fix infinite recursion which occurred when printing an object whose __str__() returned self. Will backport
* Got rid of the internal datetimetz type.Tim Peters2003-01-111-1/+1
|
* SF #665913, Fix mmap module core dump with unixNeal Norwitz2003-01-101-0/+18
| | | | | | Closing an mmap'ed file (calling munmap) twice on Solaris caused a core dump. Will backport.
* Got rid of the timetz type entirely. This was a bit trickier than ITim Peters2003-01-101-1/+1
| | | | | | | hoped it would be, but not too bad. A test had to change: time.__setstate__() can no longer add a non-None tzinfo member to a time object that didn't already have one, since storage for a tzinfo member doesn't exist in that case.
* cleaned up Jack's Mac OS9 changesJust van Rossum2003-01-091-5/+1
|
* Make the test scripts work again with narrow Python builds.Walter Dörwald2003-01-091-1/+1
|
* Add a few test cases to increase code coverage:Walter Dörwald2003-01-081-0/+115
| | | | | | | | | | | | | | | From: 69.73% of 294 source lines executed in file ./Modules/_codecsmodule.c 79.47% of 487 source lines executed in file Python/codecs.c 78.45% of 3643 source lines executed in file Objects/unicodeobject.c To: 70.41% of 294 source lines executed in file ./Modules/_codecsmodule.c 82.75% of 487 source lines executed in file Python/codecs.c 80.76% of 3638 source lines executed in file Objects/unicodeobject.c This actually unearthed a bug in the handling of None values in PyUnicode_EncodeCharmap.
* Add a test that exercises the error handling part ofWalter Dörwald2003-01-081-0/+6
| | | | PyUnicode_EncodeDecimal().
* Utterly minimal changes to collapse datetimetz into datetime, and timetzTim Peters2003-01-081-68/+89
| | | | | | | | | into time. This is little more than *exporting* the datetimetz object under the name "datetime", and similarly for timetz. A good implementation of this change requires more work, but this is fully functional if you don't stare too hard at the internals (e.g., right now a type named "datetime" shows up as a base class of the type named "datetime"). The docs also need extensive revision, not part of this checkin.
* Various tweaks to make the test work on the Mac.Jack Jansen2003-01-081-3/+12
|
* Updated the list of expected skips for MacPython-OS9.Jack Jansen2003-01-081-0/+8
|
* n the Mac the frozen import that should fail actually succeeds, and we know ↵Jack Jansen2003-01-081-6/+7
| | | | it, so skip the test in stead of confusing the end user.
* Added the Mac to platforms that don't have user/group/other modes.Jack Jansen2003-01-081-3/+6
| | | | Set the limit for the number of open files to 32 if platform==mac.
* - be explicit: audio data files should be opened in binary modeFred Drake2003-01-081-2/+2
| | | | | - ossaudiodev.open() raises IOError, not ossaudiodev.error, for cases which get mapped to TestSkipped
* Enable building and testing of ossaudiodev for Linux.Guido van Rossum2003-01-081-0/+7
|
* Fix for SF bug #642358: only provide a new with a __dict__ orGuido van Rossum2003-01-071-0/+14
| | | | | __weaklist__ descriptor if we added __dict__ or __weaklist__, respectively. With unit test.
* SF patch #662433: Fill arraymodule's tp_iter and sq_contains slotsRaymond Hettinger2003-01-071-0/+6
|
* Add a test for a feature added in rev. 2.82 of typeobject.c:Guido van Rossum2003-01-061-0/+53
| | | | | | | | | | | | | | - SLOT1BINFULL() macro: changed this to check for __rop__ overriding __op__, like binary_op1() in abstract.c -- the latter only calls the slot function once if both types use the same slot function, so the slot function must make both calls -- which it already did for the __op__, __rop__ order, but not yet for the __rop__, __op__ order when B.__class__ is a subclass of A.__class__. Also test the refinement added in rev. 2.201 that fixes the problem reported in SF bug #623669. Also test a similar provision in abstract.c's binary_op1().
* Add some print statements in verbose mode to announce that the newestGuido van Rossum2003-01-061-0/+8
| | | | | tests are run. (All tests in this module should have one of these at the top.)
* * add mms (windows media) as another schemeSkip Montanaro2003-01-061-0/+3
| | | | * reformat schemes to 80 columns
* Disable the rexec test now that rexec is out of grace.Guido van Rossum2003-01-061-0/+2
|
* Remove bastion test outputGuido van Rossum2003-01-061-10/+0
|