Skip to content
Myr

Merge pull request #2438 from colindickson/master

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

add a timeout value to connection_error_invalid_port test to accelerate failure

authored by Cory Benfield · committed by Cory Benfield · parents c7beb70, 80aee7a · Browse files · 1 file+1 added−1 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−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:test_requests.py+1 added-1 removed
307 unmodified lines
308309 def test_connection_error_invalid_port(self):310 """Connecting to an invalid port should raise a ConnectionError"""311 with pytest.raises(ConnectionError):312 requests.get("http://httpbin.org:1")312 requests.get("http://httpbin.org:1", timeout=1)313314 def test_LocationParseError(self):315 """Inputing a URL that cannot be parsed should raise an InvalidURL error"""316 with pytest.raises(InvalidURL):
1286 unmodified lines