Fix servefile -l ../ #2

Closed
joker wants to merge 1 commits from joker/servefile:targetdir_abspath into master
Contributor

Testrun on master:

$ tox -e py3 tests/test_servefile.py::test_serve_relative_directory
GLOB sdist-make: setup.py
py3 inst-nodeps: .tox/dist/servefile-0.4.4.zip
py3 installed: asn1crypto==0.24.0,atomicwrites==1.3.0,attrs==18.2.0,certifi==2018.11.29,cffi==1.12.1,chardet==3.0.4,cryptography==2.5,idna==2.8,more-itertools==6.0.0,pathlib2==2.3.3,pkg-resources==0.0.0,pluggy==0.8.1,py==1.8.0,pycparser==2.19,pyOpenSSL==19.0.0,pytest==4.3.0,requests==2.21.0,servefile==0.4.4,six==1.12.0,urllib3==1.24.1
py3 runtests: PYTHONHASHSEED='3820561726'
py3 runtests: commands[0] | pytest --tb=short tests/test_servefile.py::test_serve_relative_directory
========================================== test session starts ==========================================
platform linux -- Python 3.5.3, pytest-4.3.0, py-1.8.0, pluggy-0.8.1
rootdir: servefile, inifile:
collected 1 item                                                                                        

tests/test_servefile.py F                                                                         [100%]

=============================================== FAILURES ================================================
_____________________________________ test_serve_relative_directory _____________________________________
tests/test_servefile.py:183: in test_serve_relative_directory
    r = make_request(path)
tests/test_servefile.py:58: in make_request
    r = getattr(requests, method)(url, **kwargs)
.tox/py3/lib/python3.5/site-packages/requests/api.py:75: in get
    return request('get', url, params=params, **kwargs)
.tox/py3/lib/python3.5/site-packages/requests/api.py:60: in request
    return session.request(method=method, url=url, **kwargs)
.tox/py3/lib/python3.5/site-packages/requests/sessions.py:533: in request
    resp = self.send(prep, **send_kwargs)
.tox/py3/lib/python3.5/site-packages/requests/sessions.py:668: in send
    history = [resp for resp in gen] if allow_redirects else []
.tox/py3/lib/python3.5/site-packages/requests/sessions.py:668: in <listcomp>
    history = [resp for resp in gen] if allow_redirects else []
.tox/py3/lib/python3.5/site-packages/requests/sessions.py:165: in resolve_redirects
    raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects, response=resp)
E   requests.exceptions.TooManyRedirects: Exceeded 30 redirects.
----------------------------------------- Captured stdout call ------------------------------------------
running with args ['../', '-l']
Calling get on http://localhost:8080/ with {}
======================================= 1 failed in 0.61 seconds ========================================
ERROR: InvocationError: '.tox/py3/bin/pytest --tb=short tests/test_servefile.py::test_serve_relative_directory'
________________________________________________ summary ________________________________________________
ERROR:   py3: commands failed
Testrun on master: ``` $ tox -e py3 tests/test_servefile.py::test_serve_relative_directory GLOB sdist-make: setup.py py3 inst-nodeps: .tox/dist/servefile-0.4.4.zip py3 installed: asn1crypto==0.24.0,atomicwrites==1.3.0,attrs==18.2.0,certifi==2018.11.29,cffi==1.12.1,chardet==3.0.4,cryptography==2.5,idna==2.8,more-itertools==6.0.0,pathlib2==2.3.3,pkg-resources==0.0.0,pluggy==0.8.1,py==1.8.0,pycparser==2.19,pyOpenSSL==19.0.0,pytest==4.3.0,requests==2.21.0,servefile==0.4.4,six==1.12.0,urllib3==1.24.1 py3 runtests: PYTHONHASHSEED='3820561726' py3 runtests: commands[0] | pytest --tb=short tests/test_servefile.py::test_serve_relative_directory ========================================== test session starts ========================================== platform linux -- Python 3.5.3, pytest-4.3.0, py-1.8.0, pluggy-0.8.1 rootdir: servefile, inifile: collected 1 item tests/test_servefile.py F [100%] =============================================== FAILURES ================================================ _____________________________________ test_serve_relative_directory _____________________________________ tests/test_servefile.py:183: in test_serve_relative_directory r = make_request(path) tests/test_servefile.py:58: in make_request r = getattr(requests, method)(url, **kwargs) .tox/py3/lib/python3.5/site-packages/requests/api.py:75: in get return request('get', url, params=params, **kwargs) .tox/py3/lib/python3.5/site-packages/requests/api.py:60: in request return session.request(method=method, url=url, **kwargs) .tox/py3/lib/python3.5/site-packages/requests/sessions.py:533: in request resp = self.send(prep, **send_kwargs) .tox/py3/lib/python3.5/site-packages/requests/sessions.py:668: in send history = [resp for resp in gen] if allow_redirects else [] .tox/py3/lib/python3.5/site-packages/requests/sessions.py:668: in <listcomp> history = [resp for resp in gen] if allow_redirects else [] .tox/py3/lib/python3.5/site-packages/requests/sessions.py:165: in resolve_redirects raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects, response=resp) E requests.exceptions.TooManyRedirects: Exceeded 30 redirects. ----------------------------------------- Captured stdout call ------------------------------------------ running with args ['../', '-l'] Calling get on http://localhost:8080/ with {} ======================================= 1 failed in 0.61 seconds ======================================== ERROR: InvocationError: '.tox/py3/bin/pytest --tb=short tests/test_servefile.py::test_serve_relative_directory' ________________________________________________ summary ________________________________________________ ERROR: py3: commands failed ```
Owner

Merged, thanks :)

Merged, thanks :)
seba closed this pull request 2020-01-15 00:51:10 +01:00
seba reopened this pull request 2020-01-15 00:51:50 +01:00
seba closed this pull request 2020-01-15 00:51:54 +01:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: seba/servefile#2
No description provided.