Commit Graph

6114 Commits

Author SHA1 Message Date
Ezio Melotti e7a0cc2aa8 if zlib -> skipUnless(zlib) and minor cleanups 2009-07-04 14:58:27 +00:00
Gregory P. Smith dd7ca24eb5 Use select.poll() in subprocess, when available, rather than select() so that
it does not fail when file descriptors are large.  Fixes issue3392.

Patch largely contributed by Frank Chu (fpmc) with some improvements by me.
See http://bugs.python.org/issue3392.

Candidate for backporting to release26-maint as it is a bug fix and changes no
public API.
2009-07-04 01:49:29 +00:00
Benjamin Peterson 50a2252851 condense with assertRaises 2009-07-02 22:56:16 +00:00
Benjamin Peterson d3243d8db8 test that compile() accepts the future flag 2009-07-02 21:38:36 +00:00
Benjamin Peterson 753d16234f when print() gets unicode arguments, sep and end should be unicode by default #4618 2009-07-02 18:16:45 +00:00
Benjamin Peterson 1bf4765369 only order comparisons are removed in py3k #6119 2009-07-02 17:06:17 +00:00
Benjamin Peterson 0c6de43dd9 remove this test; a module level warning is enough 2009-07-02 16:51:56 +00:00
Benjamin Peterson 4d3f18f2ed fix a few cases where automated fail -> assert translation messed up
Thanks Joe Amenta
2009-07-01 00:36:41 +00:00
Benjamin Peterson 6b0032f2c3 use assert* methods in test_unittest 2009-06-30 23:30:12 +00:00
Benjamin Peterson 5c8da86f3a convert usage of fail* to assert* 2009-06-30 22:57:08 +00:00
Jesse Noller 1b90efbdc5 Resolves issues 5155, 5313, 5331 - bad file descriptor error with processes in processes 2009-06-30 17:11:52 +00:00
Antoine Pitrou 79c3bd80ed Backport fix for buglet from py3k 2009-06-29 14:14:56 +00:00
Kristján Valur Jónsson e007860b8b http://bugs.python.org/issue6267
Cumulative patch to http and xmlrpc
2009-06-28 21:04:17 +00:00
Benjamin Peterson 552e7a7e2f return locals and cells in get_locals() not bound globals, though 2009-06-28 19:27:55 +00:00
Amaury Forgeot d'Arc 595f7a5bf9 #2016 Fix a crash in function call when the **kwargs dictionary is mutated
during the function call setup.

This even gives a slight speedup, probably because tuple allocation
is faster than PyMem_NEW.
2009-06-25 22:29:29 +00:00
Amaury Forgeot d'Arc 14fc673d4f Remove the ipaddr module per discussion on python-dev 2009-06-23 21:09:09 +00:00
Raymond Hettinger 62641e9534 Issue 6329: Fix iteration for memoryviews. 2009-06-23 20:59:43 +00:00
R. David Murray ef087da9e7 Fix issue 5230 by having pydoc's safeimport check to see if the import
error was thrown from itself in order to decide if the module can't be
found.  Thanks to Lucas Prado Melo for collaborating on the fix and tests.
2009-06-23 18:02:46 +00:00
Guilherme Polo 7f146ab0ca Issue #5450: Moved tests involving loading tk from Lib/test/test_tcl to
Lib/lib-tk/test/test_tkinter/test_loadtk in order to follow the behaviour of
test_ttkguionly.
2009-06-21 17:22:50 +00:00
Benjamin Peterson dae5db2805 use closures 2009-06-19 22:21:12 +00:00
Benjamin Peterson 5fa09e3eb5 show that this one isn't used 2009-06-19 22:16:28 +00:00
Benjamin Peterson 9c5e4115ab add missing assertion #6313 2009-06-19 22:09:17 +00:00
Benjamin Peterson f1cccaa6b2 remove duplicate test 2009-06-19 22:07:47 +00:00
Georg Brandl c29863e3a6 #6276: Remove usage of nested() in favor of new with statement with multiple managers. 2009-06-18 22:24:26 +00:00
Hirokazu Yamamoto cdcd4bff12 Issue #6215: Fixed to use self.open() instead of open() or io.open(). 2009-06-17 07:05:33 +00:00
Mark Dickinson 5d730177a9 Acknowledge the role of the MPFR library in creating cmath_testcases.txt 2009-06-16 20:31:12 +00:00
Benjamin Peterson 08a0bbc846 don't mask encoding errors when decoding a string #6289 2009-06-16 00:29:31 +00:00
Amaury Forgeot d'Arc f81ff989d6 #6227: Because of a wrong indentation, the test was not testing what it should.
Ensure that the snippet in doctest_aliases actually contains aliases.
2009-06-14 21:20:40 +00:00
Benjamin Peterson a72be3b325 when no module is given in a 'from' relative import, make ImportFrom.module NULL 2009-06-13 20:23:33 +00:00
Benjamin Peterson 52c4bec76b give a better error message when deleting () 2009-06-13 17:08:53 +00:00
Benjamin Peterson d1f5a59edb allow importing from a module named None if it has an 'as' clause 2009-06-13 13:06:21 +00:00
Benjamin Peterson 565e1b6bb7 prevent import statements from assigning to None 2009-06-13 03:46:30 +00:00
Benjamin Peterson 4afbba3d34 keep the slice.step field as NULL if no step expression is given 2009-06-13 01:40:00 +00:00
Alexandre Vassalotti cb73bdac95 Revert r73401 per Raymond Hettinger's request.
The rational is the change might cause imcompatiblity problems with
PyYAML. In addition, Raymond wants to kept the different versions of
collections synchronized across Python versions.
2009-06-12 23:03:35 +00:00
Alexandre Vassalotti 450ae573bc Make pickling of OrderedDict instances more efficient. 2009-06-12 21:52:14 +00:00
Antoine Pitrou c5ae86b9d3 Re-enable testing of builtin open() in test_bufio in test_largefile 2009-06-12 20:54:21 +00:00
Antoine Pitrou 47a5f48006 Try to restore the old test_file and test_univnewlines as new, different files
(with the right revisions this time, hopefully)
2009-06-12 20:41:52 +00:00
Antoine Pitrou c5d2b4156c Restore the old test_file.py (for the builtin file object) as a new file named test_file2k.py 2009-06-12 20:36:25 +00:00
Antoine Pitrou 1969059327 Issue #6215: backport the 3.1 io lib 2009-06-12 20:14:08 +00:00
Amaury Forgeot d'Arc 5217c0848a Missing import in test_curses, uncovered by some buildbots.
(There are still a few test files that don't use the standard layout)
2009-06-09 23:37:11 +00:00
Eric Smith 9eeeee9d71 Restored a test that was erroneously removed. See issue 6198. 2009-06-09 12:38:08 +00:00
Benjamin Peterson a5a5728cf0 remove error checks already done in set_context() 2009-06-08 23:44:13 +00:00
Benjamin Peterson 64092a56ec backport r73273 2009-06-07 23:12:44 +00:00
Georg Brandl 9be5998760 #6206: fix test__locale. 2009-06-06 05:54:34 +00:00
Michael Foord d53d085ada Fix unittest discovery tests for Windows. Issue 6199 2009-06-05 14:14:34 +00:00
Eric Smith 7c58b09b64 Removed tests so that test_float pass on Windows. See issue 6198. 2009-06-05 12:33:26 +00:00
Hirokazu Yamamoto fbf63a7dfa Fix test__locale on windows (Backport of r72365) 2009-06-05 05:15:58 +00:00
Georg Brandl 4da2fa5517 Add test for #3684. 2009-06-04 18:59:58 +00:00
Georg Brandl 46121e79ce Better name for "Ctor". 2009-06-04 10:10:41 +00:00
Georg Brandl 19e79f79ce Avoid PendingDeprecationWarnings emitted by deprecated unittest methods. 2009-06-03 23:23:45 +00:00
Michael Foord dad7b7b1cb Restore default testRunner argument in unittest.main to None. Issue 6177 2009-06-02 18:08:27 +00:00
Gregory P. Smith 61e7fbf2c1 Fixes issue6169: it was possible for two ipaddr network addresses to compare
as both < and > than eachother.
2009-06-02 05:25:34 +00:00
Amaury Forgeot d'Arc b02ceda3a5 #4547: When debugging a very large function, it was not always
possible to update the lineno attribute of the current frame.
2009-06-01 20:53:18 +00:00
R. David Murray 8fcaebbef4 Issue 3848: document the fact that epoll register raises an IOError if
an fd is registered twice, and add some additional epoll tests.  Patch
by Christian Heimes.
2009-05-31 19:15:57 +00:00
Benjamin Peterson 382ccdfd5b remove function import 2009-05-31 14:43:00 +00:00
Antoine Pitrou 4698d9928e Issue #6152: New option '-j'/'--multiprocess' for regrtest allows running
regression tests in parallel, shortening the total runtime.
2009-05-31 14:20:14 +00:00
Antoine Pitrou 4528bcde77 The test for #5330 wasn't correct. 2009-05-30 21:39:25 +00:00
Antoine Pitrou 46dbe27f7e Issue #5330: C functions called with keyword arguments were not reported by
the various profiling modules (profile, cProfile). Patch by Hagen Fürstenau.
2009-05-30 21:27:00 +00:00
Benjamin Peterson 465089271f add with statements 2009-05-29 21:48:19 +00:00
Michael Foord b4a81c838a Add test discovery to unittest. Issue 6001. 2009-05-29 20:33:46 +00:00
R. David Murray 6b98544b32 Refactor test parameterization to resolve update timing problem. 2009-05-29 17:31:05 +00:00
Raymond Hettinger 578a228ee2 Issue 5982: Classmethod and staticmethod expose wrapped function with __func__. 2009-05-29 04:58:52 +00:00
Raymond Hettinger 822b87f276 Deprecate contextlib.nested(). The with-statement now provides this functionality directly. 2009-05-29 01:46:48 +00:00
R. David Murray 8de212bd4f Backport smtplib auth tests from r72990. 2009-05-28 18:49:23 +00:00
Philip Jenvey 6a111027f2 explicitly close files 2009-05-28 05:58:44 +00:00
R. David Murray d67ea7d4c6 fix issue #6121 by stripping spaces from the argument in the 'help'
function.
2009-05-27 20:07:21 +00:00
Benjamin Peterson 39d43b4660 correctly handle descrs with __missing__ 2009-05-27 02:43:46 +00:00
Raymond Hettinger a68cad13ae Fix field name conflicts for named tuples. 2009-05-27 02:24:45 +00:00
Collin Winter 57bef68bc0 Issue 5794: fix cPickle's unpickling of recursive tuples. 2009-05-26 04:12:39 +00:00
Georg Brandl 944f684ce6 Allow multiple context managers in one with statement, as proposed
in http://codereview.appspot.com/53094 and accepted by Guido.

The construct is transformed into multiple With AST nodes so that
there should be no problems with the semantics.
2009-05-25 21:02:56 +00:00
Benjamin Peterson 1880d8b823 add a SETUP_WITH opcode
It speeds up the with statement and correctly looks up the special
methods involved.
2009-05-25 13:13:44 +00:00
Benjamin Peterson 87e5006d8c handle errors from _PyObject_LookupSpecial when __get__ fails 2009-05-25 02:40:21 +00:00
Benjamin Peterson 176a56c69b make class skipping decorators the same as skipping every test of the class
This removes ClassTestSuite and a good bit of hacks.
2009-05-25 00:48:58 +00:00
Martin v. Löwis 0b09c42ffe Issue #6050: Don't fail extracting a directory from a zipfile if
the directory already exists.
2009-05-24 19:30:52 +00:00
Antoine Pitrou d49e375eed Issue #1309352: fcntl now converts its third arguments to a C `long` rather
than an int, which makes some operations possible under 64-bit Linux (e.g.
DN_MULTISHOT with F_NOTIFY).
2009-05-24 15:40:09 +00:00
Senthil Kumaran e266f25cf1 Fixed Issue1424152, urllib2 fails with HTTPS over Proxy. 2009-05-24 09:14:50 +00:00
R. David Murray 3724d6c392 Add smtplib test from issue 5259. 2009-05-23 21:48:06 +00:00
Antoine Pitrou f3bd687b2d Issue #3877: skip a test_fileio subtest on all BSDs, not only FreeBSD 2009-05-23 16:32:32 +00:00
Eric Smith 4b94b192ff Issue 6089: str.format raises SystemError. 2009-05-23 13:56:13 +00:00
R. David Murray 8254d39840 Fix spelling left over from testing. 2009-05-23 02:19:36 +00:00
R. David Murray 812e1c80c4 Don't be so wordy in requires('network') in case other tests
are added later, and skip the existing test if SSL is not available.
2009-05-23 02:16:58 +00:00
R. David Murray ad3058e0b8 Fix Issue #4066: smtplib.SMTP_SSL._get_socket now correctly returns
the socket.  Patch by Farhan Ahmad, test by Marcin Bachry.
2009-05-23 00:48:58 +00:00
Philip Jenvey 739aa36818 don't use subprocess.call with PIPEs as the child can fill the pipe buf and
deadlock. add a warning to subprocess docs about this, similar to Popen.wait's.
refs http://bugs.jython.org/issue1351
2009-05-22 05:35:32 +00:00
Michael Foord a50af06931 Rename TestCase._result to _resultForDoCleanups to avoid potential clashes in TestCase subclasses. Issue 6072. 2009-05-21 22:57:02 +00:00
Mark Dickinson a4e0efa4b1 Issue #5829: don't raise OverflowError for complex('1e500'). Backport of r72803. 2009-05-20 18:43:07 +00:00
Jeffrey Yasskin c8d30fec16 Fix issue #1689458 by teaching frame_setlineno how to jump to the first line of
a code object.
2009-05-20 17:57:57 +00:00
Collin Winter f03c42f0ab Issue 6032: fix refleaks in test_urllib2_localnet. 2009-05-18 21:35:40 +00:00
Jeffrey Yasskin 61328eef1f While I was modifying test_trace, it threw an exception when I accidentally
made it try to set the line number from the trace callback for a 'call' event.
This patch makes the error message a little more helpful in that case, and
makes it a little less likely that a future editor will make the same mistake
in test_trace.
2009-05-18 21:14:54 +00:00
Benjamin Peterson a27dbc68f0 completely ignore old-style stuff for type checking overloading 2009-05-16 22:40:56 +00:00
Benjamin Peterson fb6fb062e8 properly lookup __instancecheck__ and __subclasscheck__ 2009-05-16 21:44:25 +00:00
Benjamin Peterson 757b3c90e6 use skipTest() 2009-05-16 18:44:34 +00:00
Antoine Pitrou 775fd66d7b Issue #2116: Weak references and weak dictionaries now support copy()ing and deepcopy()ing. 2009-05-15 16:54:52 +00:00
Collin Winter 0f489743ef Issue 6024: make regrtest.py promote refleaks to test failures. 2009-05-14 23:26:30 +00:00
Benjamin Peterson 0db3cd6700 a useful decorator for cleaning up threads 2009-05-14 22:40:34 +00:00
Benjamin Peterson 92d102bf6d prevent refleaks from threads 2009-05-14 22:37:49 +00:00
R. David Murray 878555401e Fix test failure on Windows, and add skip check if even unicodedata
turns out not to be an external module on some other platform.
2009-05-14 16:12:57 +00:00
R. David Murray 996ba02602 Issue #4050: inspect.findsource/getsource now raise an IOError if the 'source'
file is a binary.  Patch by Brodie Rao, test by Daniel Diniz.
2009-05-13 17:14:11 +00:00
Michael Foord 5d31e057c5 Adds a verbosity keyword argument to unittest.main plus a minor fix allowing you to specify test modules / classes
from the command line.

Closes issue 5995.

Michael Foord
2009-05-11 17:59:43 +00:00
Mark Dickinson b1d45856c2 Issue #5981: Fix some float.fromhex bugs related to inf and nan handling. 2009-05-11 15:33:08 +00:00
Benjamin Peterson 784d455066 *sigh* deal with instances correctly 2009-05-09 17:23:03 +00:00