Fixed --timeout

* Require requests >= 2.3.0
* Updated test_timeout_exit_status

Close #185.
This commit is contained in:
Jakub Roztocil 2014-05-17 22:24:44 +02:00
parent 4449da456a
commit 77955c9837
2 changed files with 5 additions and 5 deletions

View File

@ -29,7 +29,7 @@ tests_require = [
install_requires = [
'requests>=2.0.0',
'requests>=2.3.0',
'Pygments>=1.5'
]
try:

View File

@ -18,13 +18,13 @@ class TestExitStatus:
assert not r.stderr
@pytest.mark.skipif(
True,
reason='timeout broken in requests'
' (https://github.com/jakubroztocil/httpie/issues/185)')
tuple(map(int, requests.__version__.split('.'))) < (2, 3, 0),
reason='timeout broken in requests prior v2.3.0 (#185)'
)
def test_timeout_exit_status(self):
r = http('--timeout=0.5', 'GET', httpbin('/delay/1'),
error_exit_ok=True)
assert HTTP_OK in r
assert r.exit_status == ExitStatus.ERROR_TIMEOUT
def test_3xx_check_status_exits_3_and_stderr_when_stdout_redirected(self):