Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

work as a library #29

Closed
graingert opened this issue Sep 7, 2016 · 3 comments
Closed

work as a library #29

graingert opened this issue Sep 7, 2016 · 3 comments

Comments

@graingert
Copy link

graingert commented Sep 7, 2016

import hashin

expected = {
  'pip': { version: '1.8', 'hashes': ['sha512:xxx', ...] },
  'shipwright': { version: '1.6.3', 'hashes': ['sha512:xxx', ...] },
}
result = hashin.hashin(packages={'pip': '1.8', 'shipwright': None}, algorithm='sha512')

assert result == expected
@graingert
Copy link
Author

bonus points for:

import hashin

expected = {
  'pip': { version: '1.8', 'hashes': ['sha512:xxx', ...] },
  'shipwright': { version: '1.6.3', 'hashes': ['sha512:xxx', ...] },
}

async def test_as_library():
    result = await hashin.hashin(packages={'pip': '1.8', 'shipwright': None}, algorithm='sha512')
    assert result == expected

@peterbe
Copy link
Owner

peterbe commented Sep 12, 2016

Go for it! Start without the async version.

@peterbe
Copy link
Owner

peterbe commented Mar 13, 2017

Seems #31 landed ahead.

@peterbe peterbe closed this as completed Mar 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants