Re: test_httpservers

Jim Baker <[email protected]>
Newsgroups gmane.comp.lang.jython.devel
Message-ID <CAL9RhrVoJ0r5evhHhL+G6TWwzDJ2rkgkRFQWPUiFrgZ+WR2yMg@mail.gmail.com>
Jeff,

I removed the modified copy of test_httpservers.py in favor of the standard
version in lib-python/2.7/test. My experience is that it works fine on
Windows 8.1 and it does not hang the regrtest:

c:\jythondev\jython27>dist\bin\jython.bat dist\Lib\test\test_httpservers.py
test_http_0_9 (__main__.BaseHTTPRequestHandlerTestCase) ... ok
test_http_1_0 (__main__.BaseHTTPRequestHandlerTestCase) ... ok
test_http_1_1 (__main__.BaseHTTPRequestHandlerTestCase) ... ok
test_request_length (__main__.BaseHTTPRequestHandlerTestCase) ... ok
test_with_continue_1_0 (__main__.BaseHTTPRequestHandlerTestCase) ... ok
test_query_arguments (__main__.SimpleHTTPRequestHandlerTestCase) ... ok
test_start_with_double_slash (__main__.SimpleHTTPRequestHandlerTestCase)
... ok
test_command (__main__.BaseHTTPServerTestCase) ... ok
test_handler (__main__.BaseHTTPServerTestCase) ... ok
test_head_keep_alive (__main__.BaseHTTPServerTestCase) ... ok
test_header_close (__main__.BaseHTTPServerTestCase) ... ok
test_internal_key_error (__main__.BaseHTTPServerTestCase) ... ok
test_request_line_trimming (__main__.BaseHTTPServerTestCase) ... ok
test_return_custom_status (__main__.BaseHTTPServerTestCase) ... ok
test_return_header_keep_alive (__main__.BaseHTTPServerTestCase) ... ok
test_send_blank (__main__.BaseHTTPServerTestCase) ... ok
test_version_bogus (__main__.BaseHTTPServerTestCase) ... ok
test_version_digits (__main__.BaseHTTPServerTestCase) ... ok
test_version_invalid (__main__.BaseHTTPServerTestCase) ... ok
test_version_none (__main__.BaseHTTPServerTestCase) ... ok
test_version_none_get (__main__.BaseHTTPServerTestCase) ... ok
test_get (__main__.SimpleHTTPServerTestCase) ... ok
test_head (__main__.SimpleHTTPServerTestCase) ... ok
test_invalid_requests (__main__.SimpleHTTPServerTestCase) ... ok
test_authorization (__main__.CGIHTTPServerTestCase) ... ok
test_headers_and_content (__main__.CGIHTTPServerTestCase) ... ok
test_invaliduri (__main__.CGIHTTPServerTestCase) ... ok
test_no_leading_slash (__main__.CGIHTTPServerTestCase) ... ok
test_os_environ_is_not_altered (__main__.CGIHTTPServerTestCase) ... ok
test_post (__main__.CGIHTTPServerTestCase) ... ok
test_url_collapse_path (__main__.CGIHTTPServerTestCase) ... ok

----------------------------------------------------------------------
Ran 31 tests in 32.974s

OK

(Same results, as would be expected, using the alternative command of start
dist\bin\jython -m test.test_httpservers, per what you reported in
http://bugs.jython.org/issue2109)

It would be worthwhile testing this on Windows 7 as well, so I will work on
getting a personal setup of Windows 7 as a VM later this week, just to see
if the delta is there or perhaps more likely in different network
configuration.

There is an exclude option (-x) for the regrtest, but this option does not
currently work:

$ dist/bin/jython dist/Lib/test/regrtest.py -x test_httpservers
Traceback (most recent call last):
  File "dist/Lib/test/regrtest.py", line 1449, in <module>
    main()
  File "dist/Lib/test/regrtest.py", line 368, in main
    nottests[:0] = args
TypeError: 'set' object does not support item assignment

I have opened a corresponding bug: http://bugs.jython.org/issue2150

- Jim


On Mon, May 19, 2014 at 3:43 AM, Jeff Allen <[email protected]> wrote:

> I notice that in recent changes our custom Lib/test/test_httpservers.py
> has been deleted. We need this to deal with issue 2109
> (http://bugs.jython.org/issue2109) until CPython catches up, and without
> it regrtest hangs on my machine.
>
> I can restore the file, but what's puzzling me is that, as we deleted
> it, we presumably think we don't need the skips it contained. But
> without them I get these failures:
>
> test_authorization (__main__.CGIHTTPServerTestCase) ... FAIL
> test_headers_and_content (__main__.CGIHTTPServerTestCase) ... FAIL
>
> test_no_leading_slash (__main__.CGIHTTPServerTestCase) ... FAIL
> test_os_environ_is_not_altered (__main__.CGIHTTPServerTestCase) ... FAIL
> test_post (__main__.CGIHTTPServerTestCase) ... FAIL
>
> Was this a choice to make it fail noisily, as with many other tests
> recently re-enabled? Or do these pass for others?
>
> For speed, and minimal change, I'm going to restore this with the #2109
> changes, but without the skips.
>
> -- Jeff Allen
>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform
> available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> Jython-dev mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jython-dev
>

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs

_______________________________________________
Jython-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jython-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.