Commit b7bc2706 authored by Denis Bilenko's avatar Denis Bilenko

disable tests in test_httpserver failing on 2.6

only on travis:

test_authorization (__main__.CGIHTTPServerTestCase) ... Traceback (most recent call last):
    File "/usr/lib/python2.6/CGIHTTPServer.py", line 255, in run_cgi
      os.execve(scriptfile, args, os.environ)
  OSError: [Errno 13] Permission denied
  FAIL
  test_headers_and_content (__main__.CGIHTTPServerTestCase) ... Traceback (most recent call last):
    File "/usr/lib/python2.6/CGIHTTPServer.py", line 255, in run_cgi
      os.execve(scriptfile, args, os.environ)
  OSError: [Errno 13] Permission denied
  FAIL
  test_invaliduri (__main__.CGIHTTPServerTestCase) ... ok
  test_post (__main__.CGIHTTPServerTestCase) ... Traceback (most recent call last):
    File "/usr/lib/python2.6/CGIHTTPServer.py", line 255, in run_cgi
      os.execve(scriptfile, args, os.environ)
  OSError: [Errno 13] Permission denied
  FAIL

  ======================================================================
  FAIL: test_get (__main__.SimpleHTTPServerTestCase)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "test_httpservers.py", line 242, in test_get
    File "test_httpservers.py", line 218, in check_status_and_reason
  AssertionError: 200 != 404

  ======================================================================
  FAIL: test_authorization (__main__.CGIHTTPServerTestCase)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "test_httpservers.py", line 349, in test_authorization
  AssertionError: ('Hello World\n', 'text/html', 200) != ("Exception happened during processing of request from ('127.0.0.1', 60525)\n----------------------------------------\n", None, 200)

  ======================================================================
  FAIL: test_headers_and_content (__main__.CGIHTTPServerTestCase)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "test_httpservers.py", line 330, in test_headers_and_content
  AssertionError: ('Hello World\n', 'text/html', 200) != ("Exception happened during processing of request from ('127.0.0.1', 38970)\n----------------------------------------\n", None, 200)

  ======================================================================
  FAIL: test_post (__main__.CGIHTTPServerTestCase)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "test_httpservers.py", line 337, in test_post
  AssertionError: "Exception happened during processing of request from ('127.0.0.1', 45146)\n----------------------------------------\n" != '1, python, 123456\n'
parent 5482db66
import sys
import os
import re
# By default, test cases are expected to switch and emit warnings if there was none
......@@ -139,10 +140,23 @@ disabled_tests = \
, 'test_thread.ThreadRunningTests.test__count'
, 'test_thread.TestForkInThread.test_forkinthread'
# XXX needs investigating
]
def disabled_tests_extend(lines):
disabled_tests.extend(lines.strip().split('\n'))
if sys.version_info[:2] == (2, 6) and os.environ.get('TRAVIS') == 'true':
# somehow these fail with "Permission denied" on travis
disabled_tests_extend('''
test_httpservers.CGIHTTPServerTestCase.test_post
test_httpservers.CGIHTTPServerTestCase.test_headers_and_content
test_httpservers.CGIHTTPServerTestCase.test_authorization
test_httpservers.SimpleHTTPServerTestCase.test_get
''')
if sys.platform == 'darwin':
disabled_tests += [
'test_subprocess.POSIXProcessTestCase.test_run_abort'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment