classification
Title: test_httpservers.CGIHTTPServerTestCase failure on 3.1-maint Mac OS X
Type: Stage: resolved
Components: Versions: Python 3.1
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, michael.foord, ned.deily
Priority: normal Keywords:

Created on 2010-05-01 11:36 by michael.foord, last changed 2010-11-21 11:00 by michael.foord. This issue is now closed.

Messages (5)
msg104711 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2010-05-01 11:36
A failure in test_httpservers.py on 31-maint (not failing in py3k) on Mac OS X 10.6.3:

test_post (__main__.CGIHTTPServerTestCase) ... Traceback (most recent call last):
  File "/private/var/folders/WD/WDk8J3uFE7OM9tRer5Oy4E+++TI/-Tmp-/tmpv_ZniR/cgi-bin/file2.py", line 2, in <module>
    import cgi
  File "/compile/py-31-maint/Lib/cgi.py", line 34, in <module>
    from operator import attrgetter
ImportError: No module named operator
[28226 refs]
FAIL

======================================================================
FAIL: test_post (__main__.CGIHTTPServerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_httpservers.py", line 379, in test_post
AssertionError: b'' != b'1, python, 123456\n'


Interesting to see the import error during the test. Running python and executing "import operator" works fine.
msg112283 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-08-01 08:10
Still reproducible?
msg112524 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2010-08-02 19:37
Yep:

test_post (__main__.CGIHTTPServerTestCase) ... Traceback (most recent call last):
  File "/private/var/folders/WD/WDk8J3uFE7OM9tRer5Oy4E+++TI/-Tmp-/tmp3KtUFW/cgi-bin/file2.py", line 2, in <module>
    import cgi
  File "/compile/release31-maint/Lib/cgi.py", line 34, in <module>
    from operator import attrgetter
ImportError: No module named operator
[28262 refs]
FAIL
test_url_collapse_path_split (__main__.CGIHTTPServerTestCase) ... ok

======================================================================
FAIL: test_post (__main__.CGIHTTPServerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_httpservers.py", line 379, in test_post
AssertionError: b'' != b'1, python, 123456\n'

----------------------------------------------------------------------
Ran 23 tests in 1.315s

FAILED (failures=1)
Traceback (most recent call last):
  File "Lib/test/test_httpservers.py", line 411, in <module>
    test_main()
  File "Lib/test/test_httpservers.py", line 405, in test_main
    CGIHTTPServerTestCase
  File "/compile/release31-maint/Lib/test/support.py", line 903, in run_unittest
    _run_suite(suite)
  File "/compile/release31-maint/Lib/test/support.py", line 886, in _run_suite
    raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "Lib/test/test_httpservers.py", line 379, in test_post
AssertionError: b'' != b'1, python, 123456\n'
msg121900 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2010-11-21 10:49
Duplicate of Issue8447 ?
msg121901 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2010-11-21 11:00
The test now passes for me on Mac OS X and yes - looks like the same issue as issue 8447.
History
Date User Action Args
2010-11-21 11:00:20michael.foordsetstatus: open -> closed
resolution: not a bug
messages: + msg121901

stage: needs patch -> resolved
2010-11-21 10:49:49ned.deilysetnosy: + ned.deily
messages: + msg121900
2010-08-02 19:37:22michael.foordsetmessages: + msg112524
2010-08-01 08:10:52georg.brandlsetnosy: + georg.brandl
messages: + msg112283
2010-05-01 11:36:06michael.foordcreate