summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* To raise TestSkipped, you must import TestSkipped.Tim Peters2004-08-041-1/+1
|
* allow ctime(), gmtime(), and localtime() to take None as equivalent to an ↵Fred Drake2004-08-031-0/+17
| | | | | | omitted arg (closes SF bug #658254, patch #663482)
* add missing import!Fred Drake2004-08-031-0/+1
|
* avoid fragility: make sure POSIXLY_CORRECT is completely controlledFred Drake2004-08-031-1/+10
| | | | for the tests, and restored properly when done
* Add the same guard as test_signal.Michael W. Hudson2004-08-031-0/+3
|
* Argh! This was meant to be part of patch #960406.Michael W. Hudson2004-08-031-0/+77
|
* Check in my refleak hunting code.Michael W. Hudson2004-08-031-19/+91
| | | | | It's not the 100% solution -- it may not even be the 90% solution -- but it does seem to help.
* nice tests dont leave little suprises in the environAnthony Baxter2004-08-031-0/+1
|
* More "noone expected this to run twice"ness removal.Michael W. Hudson2004-08-031-3/+3
|
* make this test work when run repeatedly.Michael W. Hudson2004-08-031-3/+2
|
* Removed use of 'cgi.initlog()' - the first call to cgi.log is actuallyAnthony Baxter2004-08-031-1/+0
| | | | | an initlog() (and initlog()'s docstring says "don't use this"!) This allows test_cgi to be run repeatedly in a single run of the interpreter.
* Don't exit test_main() with the lock 'done' held -- there's no cleanerMichael W. Hudson2004-08-031-0/+1
| | | | | | | way to guarantee a deadlock on the next call! If I've inadvertently done some damage to this test, sorry (but I don't think I have).
* Delete the items variable (and explain why).Michael W. Hudson2004-08-031-0/+4
|
* and a unit test for the staticmethod-of-a-non-method failure just fixedAnthony Baxter2004-08-021-0/+6
|
* Completed the patch for Bug #215126.Raymond Hettinger2004-08-022-0/+82
| | | | | | | * Fixes an incorrect variable in a PyDict_CheckExact. * Allow general mapping locals arguments for the execfile() function and exec statement. * Add tests.
* PEP-0318, @decorator-style. In Guido's words:Anthony Baxter2004-08-026-15/+284
| | | | | "@ seems the syntax that everybody can hate equally" Implementation by Mark Russell, from SF #979728.
* Removed reliance on damaged module object appearing in sys.modulesTim Peters2004-08-021-2/+1
| | | | | | after a failed import. This is the last checkin in the "change import failure semantics" series.
* New tests:Tim Peters2004-08-021-0/+84
| | | | | | | | | | test_failing_import_sticks -- if an import raises an exception, ensure that trying to import it again continues raising exceptions test_failing_reload -- if a module loads OK, but a reload raises an exception, ensure that the module is still in sys.modules, and that its __dict__ reflects as much of the reload attempt as succeeded. That doesn't seem like sane semantics, but it is backward-compatible semantics <wink>.
* Removed no-longer-needed convolutions to recover from damaged modulesTim Peters2004-08-021-14/+0
| | | | getting left beyind in sys.modules.
* Whitespace normalization.Tim Peters2004-07-311-5/+5
|
* Be more careful about reverting mutuations to system-wide (sys) variables.Tim Peters2004-07-311-20/+31
| | | | | | | This fixes 15 spurious test failures on Windows (probably all due to the test leaving a wrong path in sys.argv[0], which then prevented regrtest.py from finding the expected-output files for tests running after test_optparse).
* Upgrade optparse module and tests to Optik 1.5a1:Greg Ward2004-07-311-146/+394
| | | | | | | | | | | | | | | | | | | | | | | | | | * add expansion of default values in help text: the string "%default" in an option's help string is expanded to str() of that option's default value, or "none" if no default value. * bug #955889: option default values that happen to be strings are now processed in the same way as values from the command line; this allows generation of nicer help when using custom types. Can be disabled with parser.set_process_default_values(False). * bug #960515: don't crash when generating help for callback options that specify 'type', but not 'dest' or 'metavar'. * feature #815264: change the default help format for short options that take an argument from e.g. "-oARG" to "-o ARG"; add set_short_opt_delimiter() and set_long_opt_delimiter() methods to HelpFormatter to allow (slight) customization of the formatting. * patch #736940: internationalize Optik: all built-in user- targeted literal strings are passed through gettext.gettext(). (If you want translations (.po files), they're not included with Python -- you'll find them in the Optik source distribution from http://optik.sourceforge.net/ .) * bug #878453: respect $COLUMNS environment variable for wrapping help output. * feature #988122: expand "%prog" in the 'description' passed to OptionParser, just like in the 'usage' and 'version' strings. (This is *not* done in the 'description' passed to OptionGroup.)
* * drop the unreasonable list invariant that ob_item should never come backArmin Rigo2004-07-291-0/+17
| | | | | | | | | | | | | | | | | | | | | to NULL during the lifetime of the object. * listobject.c nevertheless did not conform to the other invariants, either; fixed. * listobject.c now uses list_clear() as the obvious internal way to clear a list, instead of abusing list_ass_slice() for that. It makes it easier to enforce the invariant about ob_item == NULL. * listsort() sets allocated to -1 during sort; any mutation will set it to a value >= 0, so it is a safe way to detect mutation. A negative value for allocated does not cause a problem elsewhere currently. test_sort.py has a new test for this fix. * listsort() leak: if items were added to the list during the sort, AND if these items had a __del__ that puts still more stuff into the list, then this more stuff (and the PyObject** array to hold them) were overridden at the end of listsort() and never released.
* SF bug #999776, zlib home page wrongNeal Norwitz2004-07-291-1/+1
| | | | Backport candidate.
* Added a new fileno() method. ZODB's repozo.py wants this so it canTim Peters2004-07-271-1/+9
| | | | apply os.fsync() to the GzipFile backup files it creates.
* Patch #995766: Keyword argument support in cPickle.Martin v. Löwis2004-07-271-0/+10
|
* Patch #995782: Add FreeBSD 5 expectations. Will backport to 2.3.Martin v. Löwis2004-07-261-0/+1
|
* added test for bug #996359.Skip Montanaro2004-07-241-3/+18
|
* Let u'%s' % obj try obj.__unicode__() first and fallback to obj.__str__().Marc-André Lemburg2004-07-231-0/+8
|
* SF patch 995225: tarfile.py fix for bug #990325Tim Peters2004-07-221-0/+0
| | | | | Removes CVS keywords from this binary file, so that test_tarfile passes regardless of whether Python is checked out with -kk.
* SF #857297 and 916874, improve handling of hard links when extractingNeal Norwitz2004-07-201-0/+21
|
* SF #846659, fix bufsize violation and GNU longname/longlink extensionsNeal Norwitz2004-07-201-1/+90
|
* Check the type of values returned by __int__, __float__, __long__,Neil Schemenauer2004-07-191-27/+80
| | | | | | __oct__, and __hex__. Raise TypeError if an invalid type is returned. Note that PyNumber_Int and PyNumber_Long can still return ints or longs. Fixes SF bug #966618.
* Don't return spurious empty fields if 'keep_empty_values' is True.Neil Schemenauer2004-07-192-2/+32
| | | | Fixes SF bug #990307.
* test_codecmaps_hk is also expected to be skipped when a mapping fileHye-Shik Chang2004-07-191-1/+2
| | | | isn't available. (Spotted by Raymond Hettinger)
* Don't try to create the directory if it already exists, otherwise the test failsNeal Norwitz2004-07-191-1/+2
|
* test_sf_950057's gen1() used an assert statement, which caused the testTim Peters2004-07-181-1/+1
| | | | to fail when running with -O. Changed to raise AssertionError instead.
* Whitespace normalization, via reindent.py.Tim Peters2004-07-183-26/+26
|
* Bring CJKCodecs 1.1 into trunk. This completely reorganizes sourceHye-Shik Chang2004-07-1813-51/+79
| | | | | | and installed layouts to make maintenance simple and easy. And it also adds four new codecs; big5hkscs, euc-jis-2004, shift-jis-2004 and iso2022-jp-2004.
* Oops! Restored the pickle test to test_pyclbr, but changed types.py soTim Peters2004-07-181-0/+1
| | | | | that pyclbr doesn't need to special-case modules that do "from types import *".
* The Darwin-specific getproxies_internetconfig() was added to urllib,Tim Peters2004-07-181-2/+2
| | | | | | | | causing test_pyclbr to fail on all other platforms. Added that routine to the urllib "ignore" list. Removed the special case for "g" in the pickle module. types.py deletes "g" from its namespace; maybe it didn't always. Whatever, the special case isn't needed today.
* Upgrade None assignment SyntaxWarning to a SyntaxError.Raymond Hettinger2004-07-171-0/+15
|
* Implemented thread-local data as proposed on python-dev:Jim Fulton2004-07-141-0/+26
| | | | http://mail.python.org/pipermail/python-dev/2004-June/045785.html
* * Hide a loop induction variable that was inadvertantly being picked upRaymond Hettinger2004-07-141-28/+0
| | | | | | | by the locals() call in the context constructor. * Remove unnecessary properties for int, exp, and sign which duplicated information returned by as_tuple().
* * Rename "Signals" to "_signals" making it non-public.Raymond Hettinger2004-07-141-1/+7
| | | | | * Context.create_decimal can take a zero default just like Decimal(). * Fix typo in comment.
* - Bug #981530: Fix UnboundLocalError in shutil.rmtree(). This affectsGuido van Rossum2004-07-141-0/+1
| | | | | | | | the documented behavior: the function passed to the onerror() handler can now also be os.listdir. [I could've sworn I checked this in, but apparently I didn't, or it got lost???]
* It helps when doing checks if something is in a tuple of strings that if youBrett Cannon2004-07-141-1/+1
| | | | put everything in the tuple in caps to use str.upper() instead of str.lower().
* Fixes a bug in testing code handling .pth files that did not restore the ↵Brett Cannon2004-07-131-29/+26
| | | | | | | | | | | | | | | | original module that is removed for testing "import" lines. Originally deleted the entry from sys.modules and then just let other code that needed it to import it again. Problem with this solution is that it lead to code that had already imported the module in question to have their own reference to a new copy of the module in question that new code couldn't reach. This lead to a failure in test_strptime since it monkey-patched the 'time' module it had a reference to while _strptime had its own reference to another copy of 'time' from being imported by test___all__ that it was using for a calculation. Also moved the testing code out of the PthFile class and into the actual test class. This was to stop using 'assert' which is useless with a -O execution.
* Using repr() generates entries that the current stats package can'tNicholas Bastin2004-07-121-3/+3
| | | | collate, so setting it back to the function name
* Fix test case for when time.tzname[0] is either UTC or GMT. Also have testBrett Cannon2004-07-121-2/+7
| | | | output more telling details when there is a failure.