Commit Graph

6858 Commits

Author SHA1 Message Date
Florent Xicluna fc4d6d7763 Silence test_subprocess. 2010-03-23 14:36:45 +00:00
Florent Xicluna 875bdf731c Skip test_format_deprecation if _ctypes is not available. Add a filter to the warning check. 2010-03-23 11:07:54 +00:00
Florent Xicluna 0805e6eed9 #7668: Fix test_httpservers failure when sys.executable contains non-ASCII bytes. 2010-03-22 17:18:18 +00:00
R. David Murray c9d1a7845b Issue #7860: platform.uname now reports the correct 'machine' type
when Python is running in WOW64 mode on 64 bit Windows.  Patch by
Brian Curtin.
2010-03-22 15:55:09 +00:00
Vinay Sajip 804899b4ab logging: Added getChild utility method to Logger and added isEnabledFor method to LoggerAdapter. 2010-03-22 15:29:01 +00:00
Florent Xicluna f08a0176a7 Get rid of buffer() in test_ctypes: backport the 3.x tests. 2010-03-22 15:02:46 +00:00
Antoine Pitrou 52093b8e57 Fix an occasional test_ftplib failure, following r79226. 2010-03-22 14:41:48 +00:00
Vinay Sajip 31e928eb3c Issue #8201: logging: Handle config errors when non-ASCII and Unicode logger names exist at the same time. 2010-03-22 13:02:28 +00:00
Victor Stinner c7790ed163 Fix the NEWS about my last commit: an unicode subclass can now override the
__unicode__ method (and not the __str__ method).

Simplify also the testcase.
2010-03-22 12:36:28 +00:00
Victor Stinner 95affc4449 Issue #1583863: An unicode subclass can now override the __str__ method 2010-03-22 12:24:37 +00:00
Michael Foord 0ce167277a expected failure should not trigger failfast behavior in unittest. 2010-03-22 01:56:54 +00:00
Michael Foord 49899690a8 Removing Python 2.3 compatibility code from unittest. 2010-03-22 01:41:11 +00:00
Michael Foord db003cb3d1 Fix failing test committed by accident. 2010-03-22 01:02:23 +00:00
Michael Foord 1b9e95339d -f/--failfast command line option for unittest. Issue 8074. Documentation still needed. Plus minor change to test_unittest to allow it to be run with python -m test.unittest 2010-03-22 01:01:34 +00:00
Michael Foord b1aa30f94d Issue 7815. __unittest in module globals trims frames from reported stacktraces in unittest. 2010-03-22 00:06:30 +00:00
Benjamin Peterson bb9d726357 take into account keyword arguments when passing too many args 2010-03-21 20:30:30 +00:00
Benjamin Peterson 965458931f improve error message from passing inadequate number of keyword arguments #6474
Note this removes the "non-keyword" or "keyword" phrases from these messages.
2010-03-21 20:21:00 +00:00
Benjamin Peterson 54bc22e9f3 don't write duplicate tests 2010-03-21 19:56:37 +00:00
Benjamin Peterson 52b32b6d6a fix import 2010-03-21 19:54:56 +00:00
Florent Xicluna 77a8849505 #8180: Fix test_pep277 on OS X and add more tests for special Unicode normalization cases. 2010-03-21 18:00:38 +00:00
Benjamin Peterson e39b2ec6ca rewrite a bit 2010-03-21 17:34:54 +00:00
Florent Xicluna b88fbf4fef Use assertRaises and add a specific warning filter. 2010-03-21 11:58:11 +00:00
Florent Xicluna 3f5d146323 No more deprecation warnings for distutils.sysconfig, following r78666.
But when the "dl" module is available, it gives a py3k deprecation warning.
2010-03-21 11:50:17 +00:00
Florent Xicluna af61719ec3 Silence some py3k SyntaxWarning using check_py3k_warnings() with "exec" statements. 2010-03-21 11:03:21 +00:00
Florent Xicluna 8f43cec41b Fix py3k warnings in test_decimal, using unittest.assertItemsEqual. 2010-03-21 10:51:40 +00:00
Florent Xicluna 0762788081 #7092 - Silence more py3k deprecation warnings, using test_support.check_py3k_warnings() helper. 2010-03-21 01:14:24 +00:00
Michael Foord 73dbe04619 A faulty load_tests in a test module no longer halts test discovery. A placeholder test, that reports the failure, is created instead. 2010-03-21 00:53:39 +00:00
Florent Xicluna fc5f6a7f40 Cleanup test_tarfile, and use check_warnings. 2010-03-20 22:26:42 +00:00
Florent Xicluna db4a321fea Cleanup test_struct using check_warnings. 2010-03-20 22:21:02 +00:00
Michael Foord 98e7b7644b Issue 7832: renaming unittest.TestCase.assertSameElements to assertItemsEqual and changing behaviour 2010-03-20 03:00:34 +00:00
Florent Xicluna 2e6d2622bd #8178 Cleanup the threads after test_thread.TestForkInThread. 2010-03-20 00:17:46 +00:00
Florent Xicluna bc27c6a5aa Various tests cleanup: check_warnings/check_py3k_warnings, unittest.assert* and setUp/tearDown. 2010-03-19 18:34:55 +00:00
Matthias Klose e9fbf2b943 - Issue #1039, #8154: Fix os.execlp() crash with missing 2nd argument. 2010-03-19 14:45:06 +00:00
Benjamin Peterson f4fd0bf7c1 keep DeprecationWarning from failing test 2010-03-19 01:06:33 +00:00
Collin Winter 001a3952c9 Add support for weak references to code objects. This will be used by an optimization in the incoming Python 3 JIT.
Patch by Reid Kleckner!
2010-03-18 21:54:01 +00:00
Florent Xicluna 2e0a53fdf6 Issue #8024: Update the Unicode database to 5.2 2010-03-18 21:50:06 +00:00
Florent Xicluna 735885428d #8155: Preserve backward compatibility for test_support.check_warnings(). Add regression tests. 2010-03-18 19:51:47 +00:00
Senthil Kumaran f3e9b2a996 Fix for Issue8135 - urllib.unquote to support mixed percent escapes 2010-03-18 12:14:15 +00:00
Collin Winter 43fe03a206 Make test_pwd more stable in the face of unusual LDAP/NIS/Kerberos deployments (the old test was flaky on Google buildslaves). 2010-03-18 00:10:34 +00:00
Antoine Pitrou d7b731d160 Issue #8104: socket.recv_into() and socket.recvfrom_into() now support
writing into objects supporting the new buffer API, for example bytearrays
or memoryviews.
2010-03-17 22:45:39 +00:00
Collin Winter 2227251a4e Fix a race condition in test_asynchat uncovered by the Unladen Swallow JIT. 2010-03-17 22:36:26 +00:00
Benjamin Peterson 0dee9c1b5c prevent lambda functions from having docstrings #8164 2010-03-17 20:41:42 +00:00
Florent Xicluna 78c1871d21 Fix and check cgi module deprecation warnings. Revert an unwanted rename in test_import. 2010-03-17 20:05:11 +00:00
Florent Xicluna 945a8ba635 Cleanup some test cases using check_warnings and check_py3k_warnings. 2010-03-17 19:15:56 +00:00
Florent Xicluna 2b73c21bed Cleanup in test_import and test_coding. 2010-03-17 19:05:04 +00:00
Ezio Melotti 187f93d986 Use "x in y" instead of y.find(x) != -1. 2010-03-17 14:22:34 +00:00
Ezio Melotti d80b4bfd0b #7092: silence some more py3k warnings. 2010-03-17 13:52:48 +00:00
Collin Winter 8b3f1ce591 Delete unused import. 2010-03-17 03:04:01 +00:00
Collin Winter 89b4f13024 Style cleanup in test_import. 2010-03-17 02:40:12 +00:00
Collin Winter ac1d93167c Fix a trivial class of (hypothetical, future) false-positive refleaks, discovered by an optimization in Unladen Swallow's past (which will become CPython's future). 2010-03-17 02:02:30 +00:00
Florent Xicluna 3cc8f211ed Issue #7783 and #7787: open_urlresource invalidates the outdated files from the local cache.
Use this feature to fix test_normalization.
2010-03-15 18:08:58 +00:00
Matthias Klose b13d04c991 - Issue #8140: extend compileall to compile single files. Add -i option. 2010-03-15 17:44:12 +00:00
Florent Xicluna ece29b2aac Do not hardcode Expat version. It's possible to build Python with --with-system-expat option. 2010-03-14 15:20:59 +00:00
Florent Xicluna 88db6f402e Minor documentation updates for xml.etree. 2010-03-14 01:22:09 +00:00
Florent Xicluna 1b51c3d4de Do not chdir when running test_xml_etree, and enhance the findfile helper. 2010-03-13 12:41:48 +00:00
Florent Xicluna 13ba1a1c65 Move the xml test data to their own directory. 2010-03-13 11:18:49 +00:00
Victor Stinner 17d905449d Issue #7818: set().test_c_api() doesn't expect a set('abc'), modify the set. 2010-03-13 00:13:22 +00:00
Benjamin Peterson 654ea3713e remove shebang line from non-executable test 2010-03-11 22:34:12 +00:00
Benjamin Peterson 9cf41d0c9d normalize shebang lines to #!/usr/bin/env python 2010-03-11 22:33:25 +00:00
Florent Xicluna e2e81e8fcd Fix repr of tree Element on windows. 2010-03-11 15:55:11 +00:00
Florent Xicluna 3e8c189faa Issue #6472: The xml.etree package is updated to ElementTree 1.3. The cElementTree module is updated too. 2010-03-11 14:36:19 +00:00
Victor Stinner 4478662f83 Another fix to test_executable() of test_sys: set the current working to avoid
the #7774 bug.
2010-03-11 13:46:06 +00:00
Victor Stinner 6ecd85f401 Fix test_executable introduce in previous commit (r78835): Windows is able to
retrieve the absolute Python path even if argv[0] has been set to a non
existent program name.
2010-03-11 13:27:35 +00:00
Victor Stinner 4a7e0c858c Issue #7774: Set sys.executable to an empty string if argv[0] has been
set to an non existent program name and Python is unable to retrieve the real
program name.

Fix also sysconfig: if sys.executable is an empty string, use the current
working directory.
2010-03-11 12:34:39 +00:00
Florent Xicluna 637637021a Revert r78830: realpath() should really be applied to sys.executable. 2010-03-11 01:50:48 +00:00
Florent Xicluna 6602ec6eff It is not optimal to test sys.stderr on a debug build. 2010-03-11 01:39:55 +00:00
Florent Xicluna e58d91c8f0 Fix the test_subprocess failure when sys.executable is meaningless: '' or a directory.
It does not fix #7774.
2010-03-11 00:56:59 +00:00
Florent Xicluna 85677617d5 Issue #7880: Fix sysconfig when the python executable is a symbolic link. 2010-03-10 23:58:42 +00:00
Florent Xicluna 4d42f2b4d1 #7772: Fix test_py3kwarn. Now the test suite could pass with "-3" flag. 2010-03-09 19:57:01 +00:00
Florent Xicluna 47627d5164 #7624: Fix isinstance(foo(), collections.Callable) for old-style classes. 2010-03-08 15:20:28 +00:00
Florent Xicluna 6f682be82b Move some tests from test_macpath to test_genericpath.CommonTest 2010-03-08 12:39:35 +00:00
Florent Xicluna faf175385d Replace the stderr logging with assertNotEqual(returncode, 0). 2010-03-08 10:59:33 +00:00
Michael Foord 5ffa325a82 Addition of setUpClass and setUpModule shared fixtures to unittest. 2010-03-07 22:04:55 +00:00
Michael Foord 53e8eeadd6 Fix for potentials errors in constructing unittest failure messages. Plus skipped test methods no longer run setUp and tearDown (Issue 8059) 2010-03-07 20:22:12 +00:00
Florent Xicluna fc8a1ed70e Refresh the documentation for the test.test_support module. 2010-03-07 19:14:12 +00:00
Florent Xicluna 400efc2259 #2777: Try hard to make Win7 buildbot happy... 2010-03-07 17:12:23 +00:00
Mark Dickinson 154b7ad07e Issue #1530559: When packing a non-integer with any integer conversion
code using struct.pack, attempt to convert to an integer first using
the argument's __int__ method (if present).  Also raise a
DeprecationWarning for any such usage of __int__.

This fixes a regression from 2.6, where some (but not all) integer
conversion codes already used __int__.
2010-03-07 16:24:45 +00:00
Florent Xicluna c083864fc8 Do not fail if returncode is 0 on send_signal/kill/terminate, for win32 platforms.
Do not hide the KeyboardInterrupt on POSIX platforms.
2010-03-07 15:27:39 +00:00
Florent Xicluna c02bbe328d #2777: Enable test_send_signal, test_terminate and test_kill on win32 platforms. 2010-03-07 12:21:36 +00:00
Florent Xicluna 6de9e938a5 Issue #7849: Now the utility ``check_warnings`` verifies if the warnings are
effectively raised.  A new utility ``check_py3k_warnings`` deals with py3k warnings.
2010-03-07 12:18:33 +00:00
Florent Xicluna 1f3b4e12e8 Fix some py3k warnings in the standard library. 2010-03-07 12:14:25 +00:00
Senthil Kumaran 4e62949217 Reverting the change made in r78431. 2010-03-07 04:09:30 +00:00
Benjamin Peterson 6b31fd0f13 eliminate py3k warnings in argparse 2010-03-07 00:29:44 +00:00
Florent Xicluna 632df993dc Skip test_send_signal, test_kill, test_terminate on win32 platforms, for 2.7a4 release. 2010-03-06 19:43:41 +00:00
Florent Xicluna 985478dbbb Minor tweaking of previous r78734, and add a NEWS entry. 2010-03-06 18:52:52 +00:00
Florent Xicluna dc1531c5c4 Create test_genericpath.CommonTest and reuse it to test other path modules. 2010-03-06 18:07:18 +00:00
Florent Xicluna 58526417ed Do not print the header lines when running a single test. 2010-03-06 17:24:36 +00:00
Vinay Sajip d45a278b93 Added schema version test in dictConfig. 2010-03-06 15:12:08 +00:00
Florent Xicluna 12d750d6b8 Backport "test.regrtest -R 2:3" syntax from py3k branch, and other minor adjustments. 2010-03-06 14:38:09 +00:00
Florent Xicluna aa90db9477 #2777: Apply same recipe on win32, i.e. do not inherit file handles. 2010-03-06 09:54:14 +00:00
Florent Xicluna b7c20028fe Print platform information to stdout, to help troubleshooting platform-specific failures. 2010-03-06 09:11:55 +00:00
Florent Xicluna 0932dc5671 Keep the test files in the ./build/ subdirectory, if Python is not installed.
Remove two hacks which are no longer needed after #7712, because all __file__ attributes are absolute.
2010-03-06 08:07:44 +00:00
Gregory P. Smith 467298cb42 Call setreuid and setregid in a subprocess to avoid altering the test runner's
process state.  Should fix issue8045.
2010-03-06 07:35:19 +00:00
Florent Xicluna af9a06a77f #2777: Apply same recipe for test_terminate and test_kill, i.e. close or redirect fds. 2010-03-06 00:16:57 +00:00
Florent Xicluna cecef392f1 #2777: Handle fds more carefully to try to fix some x86-Linux failures (namely, neal bot and twisted bot). 2010-03-05 19:31:21 +00:00
Mark Dickinson 1c0c78c61f Fix incorrect stacklevel for DeprecationWarnings originating from the struct module.
Also clean up related tests in test_struct.
The stacklevel fix should be backported to 2.6 once that branch is unfrozen.
2010-03-05 14:36:20 +00:00
Benjamin Peterson b3be23ad27 remove the svn:executable property from files that don't have shebang lines 2010-03-05 03:20:06 +00:00
Florent Xicluna 7272acfabe These line should not be there. 2010-03-05 01:12:14 +00:00
Florent Xicluna d6935631da Let's use assertIsNone / assertIsNotNone. It's hype. 2010-03-05 01:05:55 +00:00
Florent Xicluna 80e0e2d2d8 Workaround #3137: Retry SIGINT if it is not received the first time.
test_send_signal should not hang anymore on various Linux distributions.
2010-03-05 00:47:40 +00:00
Florent Xicluna ab5e17f896 #2777: Enable test_send_signal, test_kill and test_terminate on all platforms. 2010-03-04 21:31:58 +00:00
Florent Xicluna bab22a7c6d Cleanup. 2010-03-04 19:40:48 +00:00
Dirkjan Ochtman 19c9b6042e Try to fix buildbot breakage from r78384.
Thanks bitdancer and briancurtin for the help.
2010-03-04 19:21:53 +00:00
Florent Xicluna 3bc5cb7e0d #7805: wait until all workers are started before collecting their PIDs 2010-03-04 15:58:54 +00:00
Florent Xicluna a36e245deb Fix transient refleak in test_popen2. 2010-03-04 15:57:20 +00:00
Victor Stinner 7c924ec925 Issue #1054943: Fix unicodedata.normalize('NFC', text) for the Public Review
Issue #29.

PR #29 was released in february 2004!
2010-03-04 12:09:33 +00:00
Lars Gustäbel 6458104188 Issue #7232: Add support for the context manager protocol
to the TarFile class.
2010-03-03 11:55:48 +00:00
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
Georg Brandl 7224350656 Add a missing import. 2010-02-06 23:02:29 +00:00
Benjamin Peterson 239f138aea make waiting for the server to start robust 2010-02-06 22:08:15 +00:00
Georg Brandl 26a1f72637 Remove unused imports from test_logging. 2010-02-06 21:54:40 +00:00
Vinay Sajip 7f22443d94 Issue #7857: Gave server thread more time to get ready, and re-enabled a skipped test. 2010-02-06 20:28:36 +00:00
Benjamin Peterson 42d5947ef5 check type_getattro for correctness in a descriptor corner case 2010-02-06 20:14:10 +00:00
Vinay Sajip 5749d88243 Issue #7857: Tentatively re-enabling one test to see effect on buildbots. 2010-02-06 20:00:43 +00:00
R. David Murray ce6e4b0930 issue #7728: test_timeout was using a hardcoded port, which was
causing buildbot failures.  Changed to use test_support.bind_port.
Patch by Florent Xicluna.
2010-02-06 04:27:21 +00:00
Michael Foord 0877060f86 unittest.TestLoader creates a TestSuite before calling load_tests. Issue 7799. 2010-02-06 00:22:26 +00:00
Vinay Sajip 2373926964 test_logging: minor tweaks to timeouts, listening tests marked as skipped. 2010-02-05 23:43:11 +00:00
Antoine Pitrou bb445a1f22 Issue #5677: Explicitly forbid write operations on read-only file objects,
and read operations on write-only file objects.  On Windows, the system C
library would return a bogus result; on Solaris, it was possible to crash
the interpreter.  Patch by Stefan Krah.
2010-02-05 17:05:54 +00:00
Vinay Sajip 007a618a38 Issue #7857: test_logging: listener tests disabled for now. 2010-02-05 15:40:20 +00:00
Vinay Sajip 3dd734fe03 Issue #7857: test_logging: listener test now uses find_unused_port(). 2010-02-05 14:52:05 +00:00
Benjamin Peterson 565d78586b normalize exceptions passed to the __exit__ method #7853
In Python 2.x, exceptions in finally blocks are not normalized.  Since with
statements are implemented using finally blocks, ceval.c had to be tweaked to
distinguish between with finally blocks and normal ones.

A test for the finalization of generators containing with statements was also
added.
2010-02-05 02:12:14 +00:00
Benjamin Peterson 4a7ff1d80a add a test for #7853; the exception must be normalized for with 2010-02-05 01:53:27 +00:00
Vinay Sajip f7610b23de Added unit test for cfg:// resolution. 2010-02-04 21:40:56 +00:00
Vinay Sajip 28c382f73a Logging: Implemented PEP 391. 2010-02-04 18:48:53 +00:00
Brett Cannon dc84f8fbb4 Fix a typo in a docstring introduced in r77956. 2010-02-03 22:13:44 +00:00
Brett Cannon 18e4db5ebe Update a docstring to suggest using importlib.import_module instead of calling __import__ directly. 2010-02-03 22:11:54 +00:00
Mark Dickinson c68e9f0d20 Fix test_inspect.py data to match recent change to inspect_fodder.py (r77942). 2010-02-03 16:50:14 +00:00
Ezio Melotti dde5b94875 #7092: Silence more py3k warnings. Patch by Florent Xicluna. 2010-02-03 05:37:26 +00:00
Tarek Ziadé e81b0289b6 sysconfig.get_scheme_names now returns a sorted tuple 2010-02-02 22:54:28 +00:00
Ezio Melotti 1f517e1d53 #7092: Silence py3k warnings in test_exceptions and test_pep352. Patch by Florent Xicluna. 2010-02-02 17:34:37 +00:00
Ezio Melotti 8d3f130d41 Fix idioms and a couple of py3k warnings. Patch by Florent Xicluna. 2010-02-02 15:57:45 +00:00
Ezio Melotti 0ac4d4c82d Silence a couple of -3 warnings 2010-02-02 15:12:42 +00:00
Ezio Melotti 5d62cfe070 #7092: silence py3k warnings for bsddb. Patch by Florent Xicluna. 2010-02-02 08:37:35 +00:00
Victor Stinner b4b0a2935d Issue #7819: Check sys.call_tracing() arguments types.
py3k was already patched by issue #3661.
2010-01-31 22:32:15 +00:00
Antoine Pitrou f3fa074703 - Issue #6939: Fix file I/O objects in the `io` module to keep the original
file position when calling `truncate()`.  It would previously change the
  file position to the given argument, which goes against the tradition of
  ftruncate() and other truncation APIs.  Patch by Pascal Chambon.
2010-01-31 22:26:04 +00:00
Benjamin Peterson 7aedb3b30e fix windows buildbot 2010-01-31 18:02:35 +00:00
Ezio Melotti ef4909643d #7092: silence more -3 and -Wd warnings 2010-01-31 11:46:54 +00:00
Ezio Melotti a2d4653740 #7092: silence py3k warnings for deprecated modules 2010-01-30 07:22:54 +00:00
Mark Dickinson 36ecd676ea Issue #7788: Fix a crash produced by deleting a list slice with huge
step value.  Patch by Marcin Bachry.
2010-01-29 17:11:39 +00:00
Antoine Pitrou 94c33ebfa8 Issue #7610: Reworked implementation of the internal
:class:`zipfile.ZipExtFile` class used to represent files stored inside
an archive.  The new implementation is significantly faster and can
be wrapped in a :class:`io.BufferedReader` object for more speedups.
It also solves an issue where interleaved calls to `read()` and
`readline()` give wrong results.  Patch by Nir Aides.
2010-01-27 20:59:50 +00:00
Jesse Noller 654ade3e6a Issue #6963: Added maxtasksperchild argument to multiprocessing.Pool 2010-01-27 03:05:57 +00:00
Benjamin Peterson 2deb5c758a raise a clear TypeError when trying to register a non-class 2010-01-27 02:16:42 +00:00
Eric Smith 74c2577497 Added named (but not numbered) attributes to sys.getwindowsversion() test. 2010-01-27 02:06:25 +00:00
Eric Smith 59529e1ef6 Switch to test_support.get_attribute. 2010-01-27 01:21:15 +00:00
Eric Smith 514e77e0ae Removed unneeded test. 2010-01-27 00:58:43 +00:00
Eric Smith ee931b7253 Issue #7766: Change sys.getwindowsversion() return value to a named tuple and add the additional members returned in an OSVERSIONINFOEX structure. The new members are service_pack_major, service_pack_minor, suite_mask, and product_type. 2010-01-27 00:28:29 +00:00
Benjamin Peterson a43f34cc2a fix an UnboundLocalError when the release file is empty #7773 2010-01-25 03:31:13 +00:00
Ezio Melotti 469a05fe46 remove archaic functions from test_support 2010-01-24 20:48:35 +00:00
Ezio Melotti b0f5adc3f4 use assert[Not]IsInstance where appropriate 2010-01-24 16:58:36 +00:00
Ezio Melotti aa98058cc4 use assert[Not]In where appropriate 2010-01-23 23:04:36 +00:00
Tarek Ziadé c64614e043 fixed the 64bits tests for get_platform() - mac osx 2010-01-23 17:52:57 +00:00