Skip to content
Myr

Use xfail marker for a test expected to fail without Internet connection

Before adoption: this commit came in with the history the project adopted, so no landing records it.

This is only a minor improvement on the great work of https://github.com/kennethreitz/requests/pull/2859 that permits to run tests on hosts without Internet connection.

authored by Daniele Tricoli · committed by Daniele Tricoli · parent 9e9d2c6 · Browse files · 1 file+1 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−0 removed

  • tests:+1 added−0 removed

1 file+1 added−0 removed

modified:tests/test_requests.py+1 added
1105 unmodified lines
1106 req = requests.Request('GET', test_url)1107 preq = req.prepare()1108 assert test_url == preq.url11091110 @pytest.mark.xfail(raises=ConnectionError)1111 def test_auth_is_stripped_on_redirect_off_host(self, httpbin):1112 r = requests.get(1113 httpbin('redirect-to'),1114 params={'url': 'http://www.google.co.uk'},
548 unmodified lines