Commit Graph

6601 Commits

Author SHA1 Message Date
Florent Xicluna 9e220be19d Fix wording. 2010-03-02 23:56:38 +00:00
Benjamin Peterson 842b95b030 plug ref leaks 2010-03-02 23:43:47 +00:00
Victor Stinner d23d3930ff Issue #7820: The parser tokenizer restores all bytes in the right if the BOM
check fails.

Fix an assertion in pydebug mode.
2010-03-02 23:20:02 +00:00
Benjamin Peterson 0e717addd8 remove cross-version compatibility code 2010-03-02 23:02:02 +00:00
Benjamin Peterson bd56722a27 remove code to avoid BaseException.message bug 2010-03-02 22:58:01 +00:00
Florent Xicluna c0a9d4152d Test test_pep277 is only relevant for Unicode-friendly filesystems. 2010-03-02 22:34:11 +00:00
Benjamin Peterson fa31eaa5f6 convert deprecated fail* methods to assert* variants 2010-03-02 22:26:25 +00:00
Benjamin Peterson e4d90c23a3 use test_main() in __main__ section 2010-03-02 22:24:30 +00:00
Benjamin Peterson 4aa8a13b86 prevent warning filter adjustment from altering other tests 2010-03-02 22:23:33 +00:00
Benjamin Peterson 036fae39ac enable running of argparse tests and fix two that failed in the new environment 2010-03-02 22:20:10 +00:00
Benjamin Peterson 5e32fe5f9d remove another coding cookie 2010-03-02 22:08:40 +00:00
Benjamin Peterson a39e966e97 set svn:eol-style 2010-03-02 22:05:59 +00:00
Florent Xicluna 2db61fb7a8 Tentatively enable test_pep277 on all platforms. 2010-03-02 21:34:45 +00:00
Florent Xicluna d8472a4545 Refactor test_dict using assertRaises. 2010-03-02 16:00:00 +00:00
Steven Bethard e9330e7941 Initial commit of the argparse library, based on argparse 1.1.
Docs still need some updating to make getopt and optparse match the wording promised in the PEP.
There are also probably a number of :class:ArgumentParser etc. links that could be added to the argparse documentation.
2010-03-02 08:38:09 +00:00
Gregory P. Smith 7512a9068d Fix test to be skipped on windows. 2010-03-01 06:01:02 +00:00
Gregory P. Smith 6a65f85e79 Fixes issue #7999: os.setreuid() and os.setregid() would refuse to accept
a -1 parameter on some platforms such as OS X.
2010-03-01 05:43:43 +00:00
Gregory P. Smith 3c1586ab45 Cleanup the test added in r78517 based on Ezio Melotti's feedback. 2010-03-01 03:09:19 +00:00
Gregory P. Smith c1baf4ac9e Fix the new test on windows (skip it, its posix only) 2010-03-01 02:53:24 +00:00
Gregory P. Smith e6390a1503 Adds the hashlib.algorithms attribute. See issue7418. 2010-03-01 02:01:47 +00:00
Gregory P. Smith 9e5d1327f8 Issue #7242: On Solaris 9 and earlier calling os.fork() from within a
thread could raise an incorrect RuntimeError about not holding the import
lock.  The import lock is now reinitialized after fork.
2010-03-01 01:22:39 +00:00
Gregory P. Smith cce211f88c Issue #1068268: The subprocess module now handles EINTR in internal
os.waitpid and os.read system calls where appropriate.
2010-03-01 00:05:08 +00:00
Gregory P. Smith 613c7a549a Issue #7481: When a threading.Thread failed to start it would leave the
instance stuck in initial state and present in threading.enumerate().
2010-02-28 18:36:09 +00:00
Florent Xicluna 78fd521f1a Fix an oversight in r78508: p.wait() should be compared to 0 2010-02-27 21:15:27 +00:00
Florent Xicluna 98e3fc39bf Clean test_subprocess: use assertRaises, skipIf, skipUnless helpers and a custom helper assertStderrEqual. 2010-02-27 19:20:50 +00:00
Florent Xicluna be8c2b1ca7 #7793: Fix RuntimeError when running "regrtest -R" for multibyte codecs. 2010-02-27 15:10:19 +00:00
Florent Xicluna 2a903b26e9 Issue #1729305: Fix doctest to handle encode error with "backslashreplace". It fixes #7667 too. 2010-02-27 13:31:23 +00:00
Ezio Melotti 0263da547e Add a test for normpath to test_macpath. 2010-02-27 12:42:52 +00:00
Florent Xicluna f4b6186d9c #691291: codecs.open() should not convert end of lines on reading and writing. 2010-02-26 10:40:58 +00:00
Senthil Kumaran e9a78083c0 Fix for Issue7540 ; urllib2 will raise a TypeError when you try to add_data to
a existing req object already having data.
2010-02-24 20:55:31 +00:00
Senthil Kumaran 8526adfbd9 Fix for Issue3819 - urllib2 sends Basic auth across redirects 2010-02-24 16:45:46 +00:00
Eric Smith 2d9856d6ce Issue #7309: Unchecked pointer access when converting UnicodeEncodeError, UnicodeDecodeError, and UnicodeTranslateError to strings. 2010-02-24 14:15:36 +00:00
Dirkjan Ochtman ebc73dce57 Issue #7427: improve the representation of httplib.BadStatusLine exceptions. 2010-02-24 04:49:00 +00:00
Victor Stinner f20f9c299e Issue #7649: Fix u'%c' % char for character in range 0x80..0xFF
=> raise an UnicodeDecodeError. Patch written by Ezio Melotti.
2010-02-23 23:16:07 +00:00
Dirkjan Ochtman 8614817875 Fix #1537721: add writeheader() method to csv.DictWriter.
Reviewed by skip.montanaro and thomas.wouters.
2010-02-23 21:09:52 +00:00
Michael Foord d99ef9a9df unittest.TestResult can now be used with the TextTestRunner. TextTestRunner compatible with old TestResult objects. 2010-02-23 17:00:53 +00:00
Mark Dickinson cf80f04b16 Fix spacing nit. Thanks Eric Smith for the public humiliation. 2010-02-23 13:06:50 +00:00
Mark Dickinson 8ee9187a16 Make global variable overflowok into a keyword argument; this fixes a failure when running ./python -m test.regrtest -R 3:2: test_format 2010-02-23 12:53:52 +00:00
Tarek Ziadé 48cc8dc958 added make_archive (and secondary APIs) to shutil 2010-02-23 05:16:41 +00:00
R. David Murray f28fd24c36 Issue 6292: for the moment at least, the test suite passes if run
with -OO.  Tests requiring docstrings are skipped.  Patch by
Brian Curtin, thanks to Matias Torchinsky for helping review and
improve the patch.
2010-02-23 00:24:49 +00:00
Eric Smith 87bcb243ac Issue #6902: Fix problem with built-in types format incorrectly with 0 padding. 2010-02-23 00:11:16 +00:00
Michael Foord ae3db0a12b Support for old TestResult object (unittest) with warnings when using unsupported features. 2010-02-22 23:28:32 +00:00
Jack Diederich 5cac46dd41 * fix issue#7476 2010-02-22 21:27:38 +00:00
Jack Diederich 1ce6136018 fixes issue #1522237, bad init check in _threading_local 2010-02-22 19:55:22 +00:00
Andrew M. Kuchling b72b0eb357 #7627: MH.remove() would fail if the MH mailbox was locked;
it would call _unlock_file() and pass it a closed file object.  Noted by Rob Austein.
2010-02-22 18:42:07 +00:00
Eric Smith f32d4acead Issue #7988: Fix default alignment to be right aligned for complex.__format__. Now it matches other numeric types. 2010-02-22 18:33:47 +00:00
Michael Foord 2f6775617c Silence UnicodeWarning in crazy unittest test. 2010-02-21 14:48:59 +00:00
Mark Dickinson 92cb4a8c6f Reduce number of random tests in test_strtod, to avoid hogging buildbot time. 2010-02-21 14:42:27 +00:00
Mark Dickinson 45ad801ed0 Issue #7384: skip test_curses on FreeBSD, in order to allow other buildbot tests to complete. 2010-02-21 13:37:53 +00:00
Mark Dickinson 82b34c5dbe Issue #5211: Fix complex type to avoid implicit calls to
complex.__coerce__.  Thanks Meador Inge for the patch.
2010-02-21 12:57:35 +00:00
Ezio Melotti 9e9af21d45 skip tests with a non-ascii cwd when the file system encoding is ascii 2010-02-20 22:34:21 +00:00
Senthil Kumaran 18d5a69669 Fix for Issue7751: urllib.urlopen("///C|/foo/bar/spam.foo") 2010-02-20 22:05:34 +00:00
Ezio Melotti e3467d5c96 Remove e assertIs definitions and use correct assert* methods. 2010-02-20 09:40:07 +00:00
Ezio Melotti 4cc80ca921 #3426: os.path.abspath now returns unicode when its arg is unicode. 2010-02-20 08:09:39 +00:00
Senthil Kumaran 4e78de89d0 Fix for Issue7904. urlparse.urlsplit to handle schemes in the way defined by RFC3986 2010-02-19 07:32:48 +00:00
Fred Drake cc43b56960 - apply patch from issue 7005
- add corresponding documentation
2010-02-19 05:24:30 +00:00
Michael Foord c2294dd6ba Fix unittest.TestCase.assertDictContainsSubset so it can't die with unicode issues when constructing failure messages. Issue 7956 2010-02-18 21:37:07 +00:00
Michael Foord 225a099fe5 unittest.TestCase uses safe_repr for producing failure messages. Partial fix for issue 7956 2010-02-18 20:30:09 +00:00
Mark Dickinson 6d8effb1fc Issue #7633: Context method in the decimal module (with the exception
of the 'canonical' and 'is_canonical' methods) now consistently accept
integer arguments wherever a Decimal instance is accepted.  Thanks
Juan José Conti for the patch.
2010-02-18 14:27:02 +00:00
Ezio Melotti e511fc7979 #7930: fix stripid 2010-02-16 23:26:09 +00:00
Mark Dickinson 876473bcc8 Check that 'd' isn't allowed as an exponent specifier in inputs to the float function. 2010-02-12 21:16:38 +00:00
R. David Murray 7c29f071d5 Issue 5754: tweak shelve doc wording to make it clearer that even when
writeback=True values are written to the backing store when assigned to
the shelf.  Add test to confirm that this happens.  Doc patch and added
test by Robert Lehmann.  I also fixed the cross references to the sync
and close methods.
2010-02-11 01:38:42 +00:00
Ezio Melotti 8f6a287029 #7712: add a temp_cwd context manager to test_support and use it in regrtest to run all the tests in a temporary directory, saving the original CWD in test_support.SAVEDCWD. Thanks to Florent Xicluna who helped with the patch. 2010-02-10 21:40:33 +00:00
Michael Foord 1c3abf475e Fix for unittest tests, to be merged to py3k 2010-02-10 15:50:58 +00:00
Michael Foord db43b5a1f5 Issue 7893 and Issue 7588 2010-02-10 14:25:12 +00:00
Antoine Pitrou 42fb6ab491 Issue #2746: Don't escape ampersands and angle brackets ("&", "<", ">")
in XML processing instructions and comments.  These raw characters are
allowed by the XML specification, and are necessary when outputting e.g.
PHP code in a processing instruction.  Patch by Neil Muller.
2010-02-09 17:08:05 +00:00
Georg Brandl 11f5c9e001 Convert test failure from output-producing to self.fail(). 2010-02-08 22:48:37 +00:00
Michael Foord fe6349c965 Make assertMultiLineEqual the default for comparing unicode strings. 2010-02-08 22:41:16 +00:00
Georg Brandl 0c4783a33c Fix missing string formatting placeholder. 2010-02-08 22:40:51 +00:00
Vinay Sajip cfc43e9435 logging: gingerly re-enabling skipped tests after improving thread sync code in configurator. 2010-02-08 21:18:15 +00:00
Vinay Sajip 9a164ac800 Issue #7857: Another attempt to keep the buildbots happy. 2010-02-08 16:05:50 +00:00
Vinay Sajip e1ec841086 logging: skipped listening tests because they're not working reliably. 2010-02-08 15:32:08 +00:00
Vinay Sajip 7ed8001862 Removed spurious print statement in test. 2010-02-08 06:50:14 +00:00
Georg Brandl 6eedef60a2 Fix test_fnmatch. 2010-02-08 00:04:54 +00:00
Mark Dickinson 841e7f3ae2 Skip test_strtod entirely when correctly-rounded string->float isn't implemented 2010-02-07 20:31:10 +00:00
Ronald Oussoren dd25e86cf4 Issue 6003: ZipFile.writestr "compression_type" argument 2010-02-07 20:18:02 +00:00
Michael Foord 2bd52dcccb assertRaises as context manager now allows you to access exception as documented 2010-02-07 18:44:12 +00:00
Georg Brandl a4f46e1292 Remove unused imports in test modules. 2010-02-07 17:03:15 +00:00
Georg Brandl dc3694bee0 Rename "exc_value" attribute on assertRaises context manager to "exception". 2010-02-07 17:02:22 +00:00
Antoine Pitrou 4ad752d70f Issue #7870: Remove duplicate test methods. Reported by Georg Brandl. 2010-02-07 16:56:23 +00:00
Mark Dickinson 1224f4afb4 Actually raise on failure, instead of doing nothing. 2010-02-07 13:09:52 +00:00
Mark Dickinson 4dcba97590 Add missing global declarations for 'overflowok'; remove 'overflowrequired', which is no longer needed. 2010-02-07 13:01:56 +00:00
Georg Brandl b86d3fa43c Remove duplicate test method. 2010-02-07 12:55:12 +00:00
Georg Brandl 308e18b595 Add a minimal test for fnmatchcase(). 2010-02-07 12:34:26 +00:00
Georg Brandl a34f87f981 Fix a redefined test method. 2010-02-07 12:27:06 +00:00
Georg Brandl 41dc63fae5 Fix two redefined test methods. 2010-02-07 12:25:50 +00:00
Georg Brandl b3cda98dd1 Fix wrong usage of "except X, Y:". 2010-02-07 12:19:43 +00:00
Georg Brandl 7ae6018788 Fix another duplicated test method. 2010-02-07 12:16:12 +00:00
Ronald Oussoren ab3f5cbabd A number of APIs in macostools cannot work in 64-bit mode because they
use Carbon APIs that aren't available there.

This patch disables tests for the affected entrypoints in macostools and
mentions this in the documentation.

In theory it is possible to replace the implementation by code that does
work in 64-bit mode, but that would require further updates to the Carbon
wrappers because the modern APIs aren't wrapped properly.
2010-02-07 11:38:28 +00:00
Vinay Sajip 657514a690 Issue #7868: logging: added loggerClass attribute to Manager. 2010-02-07 01:37:08 +00:00
Georg Brandl 12cad204a0 Add missing import. 2010-02-06 23:58:25 +00:00
Georg Brandl cd4a21bb8e Fix more unbound locals in code paths that do not seem to be used. 2010-02-06 23:34:10 +00:00
Georg Brandl bd564c3c21 Fix import/access for some identifiers. _TestSharedCTypes does not seem to be executed? 2010-02-06 23:33:33 +00:00
Georg Brandl c7ca56d213 We heard you like test failures so we put unbound locals in your test so that you can fail while you fail. 2010-02-06 23:23:45 +00:00
Georg Brandl d10d8ee2a1 Fix various missing import/unbound name errors. 2010-02-06 23:18:00 +00:00
Georg Brandl 1a0ffe168a Remove duplicate test method. 2010-02-06 23:12:19 +00:00
Georg Brandl d1fa76e742 Add missing import. 2010-02-06 23:12:12 +00:00
Mark Dickinson 28d4f9e668 testCopysign was defined twice in test_math; combine the definitions 2010-02-06 23:11:25 +00:00
Georg Brandl df8a303dff Fix a few UnboundLocalErrors in test_long. 2010-02-06 23:08:00 +00:00
Georg Brandl 8fd107f8ea Add missing imports. 2010-02-06 23:06:24 +00:00