-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #250 from prkumar/master
Release v0.9.6
- Loading branch information
Showing
19 changed files
with
791 additions
and
472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,3 +123,5 @@ Pipfile.lock | |
# macOS | ||
.DS_Store | ||
|
||
# VS Code | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import sys | ||
|
||
collect_ignore = [] | ||
if sys.version_info.major < 3: | ||
collect_ignore.extend( | ||
[ | ||
"unit/test_aiohttp_client.py", | ||
"integration/test_retry_aiohttp.py", | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Third-party imports | ||
import pytest | ||
|
||
# Local imports. | ||
from uplink.clients import io | ||
|
||
from . import test_retry | ||
|
||
|
||
@pytest.mark.asyncio | ||
async def test_retry_with_asyncio(mock_client, mock_response): | ||
import asyncio | ||
|
||
@asyncio.coroutine | ||
def coroutine(): | ||
return mock_response | ||
|
||
# Setup | ||
mock_response.with_json({"id": 123, "name": "prkumar"}) | ||
mock_client.with_side_effect([Exception, coroutine()]) | ||
mock_client.with_io(io.AsyncioStrategy()) | ||
github = test_retry.GitHub(base_url=test_retry.BASE_URL, client=mock_client) | ||
|
||
# Run | ||
response = await github.get_user("prkumar") | ||
|
||
# Verify | ||
assert len(mock_client.history) == 2 | ||
assert response.json() == {"id": 123, "name": "prkumar"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.