gawel / WSGIProxy2

A WSGI Proxy with various http client backends

Home Page:https://wsgiproxy2.readthedocs.org/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doctests failure due to missing README_fixt.py

Arfrever opened this issue · comments

README_fixt.py is missing in WSGIProxy2-0.4.zip available on PyPI, which results in failure of doctests.

$ nosetests-2.7
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
nose.plugins.cover: INFO: Coverage report will include only packages: ['wsgiproxy']
Doctest: README.rst ... FAIL
nose.selector: INFO: /tmp/WSGIProxy2-0.4/wsgiproxy/restkit_client.py is executable; skipped
test_proxy (wsgiproxy.tests.TestExtractUri) ... ok
test_transparent_proxy (wsgiproxy.tests.TestExtractUri) ... ok
test_chunked (wsgiproxy.tests.TestHttplib) ... ok
test_form (wsgiproxy.tests.TestHttplib) ... ok
test_head (wsgiproxy.tests.TestHttplib) ... ok
test_not_allowed_method (wsgiproxy.tests.TestHttplib) ... ok
test_redirect (wsgiproxy.tests.TestHttplib) ... ok
test_status (wsgiproxy.tests.TestHttplib) ... ok
test_webob_error (wsgiproxy.tests.TestHttplib) ... ok
test_exception (wsgiproxy.tests.TestMisc) ... ok
test_rewrite_location (wsgiproxy.tests.TestMisc) ... ok
test_socket_gaierror (wsgiproxy.tests.TestMisc) ... ok
test_socket_timeout (wsgiproxy.tests.TestMisc) ... ok
test_chunked (wsgiproxy.tests.TestRequests) ... ok
test_form (wsgiproxy.tests.TestRequests) ... ok
test_head (wsgiproxy.tests.TestRequests) ... ok
test_not_allowed_method (wsgiproxy.tests.TestRequests) ... ok
test_redirect (wsgiproxy.tests.TestRequests) ... ok
test_status (wsgiproxy.tests.TestRequests) ... ok
test_webob_error (wsgiproxy.tests.TestRequests) ... ok
test_chunked (wsgiproxy.tests.TestRestkit) ... ok
test_form (wsgiproxy.tests.TestRestkit) ... ok
test_head (wsgiproxy.tests.TestRestkit) ... ok
test_not_allowed_method (wsgiproxy.tests.TestRestkit) ... ok
test_redirect (wsgiproxy.tests.TestRestkit) ... ok
test_status (wsgiproxy.tests.TestRestkit) ... ok
test_webob_error (wsgiproxy.tests.TestRestkit) ... ok
test_chunked (wsgiproxy.tests.TestUrllib3) ... ok
test_form (wsgiproxy.tests.TestUrllib3) ... ok
test_head (wsgiproxy.tests.TestUrllib3) ... ok
test_not_allowed_method (wsgiproxy.tests.TestUrllib3) ... ok
test_redirect (wsgiproxy.tests.TestUrllib3) ... ok
test_status (wsgiproxy.tests.TestUrllib3) ... ok
test_webob_error (wsgiproxy.tests.TestUrllib3) ... ok

======================================================================
FAIL: Doctest: README.rst
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/doctest.py", line 2226, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for README.rst
  File "/tmp/WSGIProxy2-0.4/README.rst", line 0

----------------------------------------------------------------------
File "/tmp/WSGIProxy2-0.4/README.rst", line 19, in README.rst
Failed example:
    proxy = HostProxy(application_url)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python2.7/doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest README.rst[1]>", line 1, in <module>
        proxy = HostProxy(application_url)
    NameError: name 'application_url' is not defined
----------------------------------------------------------------------
File "/tmp/WSGIProxy2-0.4/README.rst", line 26, in README.rst
Failed example:
    resp = req.get_response(proxy)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python2.7/doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest README.rst[4]>", line 1, in <module>
        resp = req.get_response(proxy)
    NameError: name 'proxy' is not defined
----------------------------------------------------------------------
File "/tmp/WSGIProxy2-0.4/README.rst", line 27, in README.rst
Failed example:
    print(resp.text)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python2.7/doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest README.rst[5]>", line 1, in <module>
        print(resp.text)
    NameError: name 'resp' is not defined
----------------------------------------------------------------------
File "/tmp/WSGIProxy2-0.4/README.rst", line 39, in README.rst
Failed example:
    proxy = HostProxy(application_url, client='urllib3')
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python2.7/doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest README.rst[6]>", line 1, in <module>
        proxy = HostProxy(application_url, client='urllib3')
    NameError: name 'application_url' is not defined
----------------------------------------------------------------------
File "/tmp/WSGIProxy2-0.4/README.rst", line 43, in README.rst
Failed example:
    proxy = HostProxy(application_url, client='requests')
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python2.7/doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest README.rst[7]>", line 1, in <module>
        proxy = HostProxy(application_url, client='requests')
    NameError: name 'application_url' is not defined


Name                        Stmts   Miss  Cover   Missing
---------------------------------------------------------
wsgiproxy                       3      0   100%   
wsgiproxy.proxies             157      0   100%   
wsgiproxy.requests_client      28      2    93%   26, 32
wsgiproxy.restkit_client        8      0   100%   
wsgiproxy.urllib3_client       21      0   100%   
---------------------------------------------------------
TOTAL                         217      2    99%   
----------------------------------------------------------------------
Ran 35 tests in 3.701s

FAILED (failures=1)

fixed:

hard linking README_fixt.py -> WSGIProxy2-0.4.1