Commit Graph

4601 Commits

Author SHA1 Message Date
Georg Brandl ff9b963387 Catch the correct errors. 2007-08-24 19:22:34 +00:00
Collin Winter 0f5e87a266 Convert test_pkg to use unittest. 2007-08-24 19:13:58 +00:00
Georg Brandl fe3b4b9507 Convert test_linuxaudiodev to unittest. Fix a wrong finally clause in test_ossaudiodev. 2007-08-24 18:46:27 +00:00
Georg Brandl e7445de2b1 Remove output file for test_ossaudiodev, also properly close the dsp object. 2007-08-24 18:35:27 +00:00
Georg Brandl 0c6a438aea Remove test_rgbimg output file, there is no test_rgbimg.py. 2007-08-24 18:30:06 +00:00
Georg Brandl 692bbc4790 Port test_frozen to unittest. 2007-08-24 18:22:54 +00:00
Georg Brandl 9f2b93e03a Patch #1008: port test_signal to unittest. 2007-08-24 18:07:52 +00:00
Georg Brandl 3376a9a711 Patch #1006: port test_winreg to unittest. 2007-08-24 17:38:49 +00:00
Guido van Rossum 966bb8c59b Fix silly typo in test name. 2007-08-24 14:53:14 +00:00
Gregory P. Smith 1042a4d719 Fix bug 1725856. 2007-08-24 05:11:38 +00:00
Brett Cannon dbed7a7394 Make test_runpy re-entrant. 2007-08-23 14:53:17 +00:00
Alex Martelli d8672aa8a4 Fix compile.c so that it records 0.0 and -0.0 as separate constants in a code
object's co_consts tuple; add a test to show that the previous behavior (where
these two constants were "collapsed" into one) causes serious malfunctioning.
2007-08-22 21:14:17 +00:00
Facundo Batista 1bc8d639df Added test for behavior of operations on an unconnected SMTP object,
and tests for NOOP, RSET, and VRFY. Corrected typo in a comment for
testNonnumericPort. Added a check for constructing SMTP objects when
non-numeric ports are included in the host name. Derived a server from
SMTPServer to test various ESMTP/SMTP capabilities. Check that a
second HELO to DebuggingServer returns an error. [GSoC - Alan McIntyre]
2007-08-21 16:57:18 +00:00
Georg Brandl d7e9f608c3 Revert accidental checkins from last commit. 2007-08-21 06:03:43 +00:00
Georg Brandl fdca6d8599 Demand version 2.5.1 since 2.5 has a bug with codecs.open context managers. 2007-08-21 06:01:18 +00:00
Facundo Batista c65a5f1b14 Catch ProtocolError exceptions and include the header information in
test output (to make it easier to debug test failures caused by
problems in the server). [GSoC - Alan McIntyre]
2007-08-21 00:16:21 +00:00
Hye-Shik Chang 2390104d81 Add cheot-ga-keut composed make-up sequence support in EUC-KR codec. 2007-08-20 06:49:18 +00:00
Brett Cannon 855da6cbbf Make test_warnings re-entrant. 2007-08-17 20:16:15 +00:00
Facundo Batista 7f686fce40 Added a flag (_send_traceback_header) to the SimpleXMLRPCServer class
that allows sending back exception/stack trace information about
internal server errors (this flag defaults to False to avoid sending
such information unless explicitly enabled).  Added tests to verify
behavior of this new feature (these tests are skipped on win32 because
of problems with WSAEWOULDBLOCK). Renamed HTTPTestCase to
SimpleServerTestCase. [GSoC - Alan McIntyre]
2007-08-17 19:16:44 +00:00
Walter Dörwald 6e39080649 Backport r57105 and r57145 from the py3k branch: UTF-32 codecs. 2007-08-17 16:41:28 +00:00
Brett Cannon 5a0382eeb6 Fix a missed instance of test.test_support.guard_warnings_filter (which was
recently removed).
2007-08-14 17:53:30 +00:00
Facundo Batista a53872b09a Added tests for simple function calls and introspection that are run
against a SimpleXMLRPCServer in a separate thread.  Because of
problems with WSAEWOULDBLOCK (error 10035) being raised by the server
on Windows, these new tests are skipped on win32. [GSoC - Alan McIntyre]
2007-08-14 13:35:00 +00:00
Brett Cannon 2ee4128e9b Remove test.test_support.guard_warnings_filter.
test.test_support.catch_warning is more full-featured and provides the same
functionality.

Since guard_warnings_filter was added in 2.6 there is no
backwards-compatibility issues.
2007-08-14 05:51:06 +00:00
Brett Cannon 7b97e8a9c2 Fix a minor typo in a docstring. 2007-08-14 03:38:47 +00:00
Georg Brandl 9616444427 Revert the fix for #1548891, it broke backwards compatibility with arbitrary read buffers.
Fixes #1730114.
2007-08-08 13:03:41 +00:00
Hye-Shik Chang f3e93a0268 Fix gb18030 codec's bug that doesn't map two-byte characters on
GB18030 extension in encoding. (bug reported by Bjorn Stabell)
2007-08-04 04:10:18 +00:00
Facundo Batista 412b8b654c Allow the OS to select a free port for each test server. For
DebuggingServerTests, construct SMTP objects with a localhost argument
to avoid abysmally long FQDN lookups (not relevant to items under
test) on some machines that would cause the test to fail. Moved server
setup code in the server function inside the try block to avoid the
possibility of setup failure hanging the test.  Minor edits to conform
to PEP 8. [GSoC - Alan McIntyre]
2007-08-01 23:18:36 +00:00
Facundo Batista 4950442fb7 When running asynchat tests on OS X (darwin), the test client now
overrides asyncore.dispatcher.handle_expt to do nothing, since
select.poll gives a POLLHUP error at the completion of these tests.
Added timeout & count arguments to several asyncore.loop calls to
avoid the possibility of a test hanging up a build. [GSoC - Alan
McIntyre]
2007-07-31 03:03:34 +00:00
Facundo Batista ec62423be4 Added tests for asynchat classes simple_producer & fifo, and the
find_prefix_at_end function. Check behavior of a string given as a
producer.  Added tests for behavior of asynchat.async_chat when given
int, long, and None terminator arguments. Added usepoll attribute to
TestAsynchat to allow running the asynchat tests with poll support
chosen whether it's available or not (improves coverage of asyncore
code). [GSoC - Alan McIntyre]
2007-07-29 14:23:08 +00:00
Facundo Batista 8eab424fb5 Moved all of the capture_server socket setup code into the try block
so that the event gets set if a failure occurs during server setup
(otherwise the test will block forever).  Changed to let the OS assign
the server port number, and client side of test waits for port number
assignment before proceeding. The test data in DispatcherWithSendTests
is also sent in multiple send() calls instead of one to make sure this
works properly. [GSoC - Alan McIntyre]
2007-07-28 14:21:22 +00:00
Martin v. Löwis f1e0b3f630 Bug #1704793: Return UTF-16 pair if unicodedata.lookup cannot
represent the result in a single character.
2007-07-28 07:03:05 +00:00
Martin v. Löwis f25e35b9ec Bug #978833: Close https sockets by releasing the _ssl object. 2007-07-27 18:28:22 +00:00
Nick Coghlan ec2ce9bbae Make test_math error messages more meaningful for small discrepancies in results 2007-07-27 10:36:30 +00:00
Nick Coghlan 00f2029cd5 Add explicit test for a misbehaving math.floor 2007-07-26 14:03:00 +00:00
Nick Coghlan 55248d6c61 Add a temporary diagnostic message before a strange failure on the alpha Debian buildbot 2007-07-25 13:18:58 +00:00
Nick Coghlan d44a5afaa9 More buildbot cleanup - let the OS assign the port for test_urllib2_localnet 2007-07-25 12:57:48 +00:00
Facundo Batista 16ed5b4bfe New tests for basic behavior of smtplib.SMTP and
smtpd.DebuggingServer. Change to use global host & port number
variables. Modified the 'server' to take a string to send back in
order to vary test server responses. Added a test for the reaction of
smtplib.SMTP to a non-200 HELO response. [GSoC - Alan McIntyre]
2007-07-24 21:20:42 +00:00
Nick Coghlan 12adef9b8b Try to get rid of spurious failure in test_resource on the Debian buildbots by changing the file size limit before attempting to close the file 2007-07-24 14:39:23 +00:00
Nick Coghlan 13c25c08ca Fix an incompatibility between the -i and -m command line switches as reported on python-dev by PJE - runpy.run_module now leaves any changes it makes to the sys module intact after the function terminates 2007-07-24 13:58:28 +00:00
Nick Coghlan 4f82a03714 Tweak runpy test to do a better job of confirming that sys has been manipulated correctly 2007-07-24 13:07:38 +00:00
Nick Coghlan ae21fc6d1f Correctly cleanup sys.modules after executing runpy relative import
tests
Restore Python 2.4 ImportError when attempting to execute a package
(as imports cannot be guaranteed to work properly if you try it)
2007-07-23 13:41:45 +00:00
Nick Coghlan f17a2e4f87 Add explicit relative import tests for runpy.run_module 2007-07-22 10:18:07 +00:00
Facundo Batista 7f4f41255f Selectively enable tests for asyncore.readwrite based on the presence
of poll support in the select module (since this is the only case in
which readwrite can be called). [GSoC - Alan McIntyre]
2007-07-22 00:13:00 +00:00
Facundo Batista b1994b4a5d Added a select.select call in the test server loop to make sure the
socket is ready to be read from before attempting a read (this
prevents an error 10035 on some Windows platforms). [GSoC - Alan
McIntyre]
2007-07-19 23:57:38 +00:00
Kurt B. Kaiser db98f3632a Fix failing unicode test caused by change to ast.c at r56441 2007-07-18 19:58:42 +00:00
Guido van Rossum b6ac23cd07 SF patch# 1755885 by Kurt Kaiser: show location of Unicode escape errors.
(Slightly tweaked for style and refcounts.)
2007-07-18 17:19:14 +00:00
Facundo Batista 78e19616f3 Prevent asyncore.dispatcher tests from hanging by adding loop counters
to server & client, and by adding asyncore.close_all calls in
tearDown. Also choose correct expected logging results based on the
value of __debug__  [Alan McIntyre - GSoC]
2007-07-17 02:19:39 +00:00
Facundo Batista 66263cf151 Changed the used port and commented out some tests that uses
a non documented function that appers to uses resources
not present in Windows.
2007-07-15 20:30:39 +00:00
Facundo Batista f47bc182f1 First version. Includes tests for helper functions: read, write,
_exception, readwrite, closeall, compact_traceback; and for classes
dispatcher, dispatcher_with_send, and file_wrapper.
[Alan McIntyre - GSoC]
2007-07-14 22:41:45 +00:00
Andrew M. Kuchling 2b09ef0c6d Avoid exception if there's a stray directory inside a Maildir folder.
The Maildir specification doesn't seem to say anything about this
situation, and it can happen if you're keeping a Maildir mailbox in
Subversion (.svn directories) or some similar system.  The patch just
ignores directories in the cur/, new/, tmp/ folders.
2007-07-14 21:56:19 +00:00