From: Alan K. <jyt...@xh...> - 2007-06-21 20:27:38
|
[Oti] > [java] test_poll > [java] test test_poll crashed -- exceptions.AttributeError: class > 'org.python.modules.os' has no attribute 'pipe' As I mentioned before, there is no point in running these test_poll: it tests for cpython facilities that are not currently available on jython. Test_poll should either A: Be excluded from the test run, or B: Left in place to remind us that although pipes are not currently supported on jython, they theoretically could be, as long as there is a subprocess running on the other end of the pipe. This would require substantial modification of the jython popen* calls, to use Pipe.SinkChannel and Pipe.SourceChannel. [Oti] > [java] test_select > <snipped ok messages> > [java] test test_select produced unexpected output: > [java] > ********************************************************************** > [java] *** line 2 of actual output doesn't appear in expected > output after line 1: > [java] + Unable to run testSocketRegisteredBeforeConnected: no > server on port 80 > [java] > ********************************************************************** This is a simple problem, but I'm not sure how best to fix this test. The test in question expects to connect to some TCP server on localhost. As I always have a HTTP server running on port 80 on my machine, and expect most other machines to be the same, I used port 80. But there is obviously no server running on port 80 on the test machine. There are three solutions 1. Use a TCP port that *will* always be listening when the test is run; the protocol doesn't matter, it just needs to be accepting connections. 2. Run up a TCP server, as a part of the test, solely for the duration of the test, then tear it down again. A lot of work for a small gain. 3. Pick a well known HTTP server on the 'net, e.g. www.python.org:80. But this could give rise to network latencies that might cause the test to fail unnecessarily. What think ye? Are there any existing TCP servers running on the test machine? [Oti] > [java] test_socket > <snipped ok messages> > [java] > ---------------------------------------------------------------------- > [java] Ran 67 tests in 2.609s > [java] OK > [java] test test_socket produced unexpected output: > [java] > ********************************************************************** > [java] *** line 2 of expected output missing: > [java] - socket.error > [java] > ********************************************************************** This was very simple; the expected output file was expecting the test_socket module to print "socket.error", which it doesn't: I spent a lot of time to make sure that it doesn't! I've checked in the correction to the Lib/test/output/test_socket file; that socket error will no longer appear. Regards, Alan. |