- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 140
 
Just a concept of gather-like method #1966
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
e09e762
              dffe4f7
              e858b8b
              d1920b0
              4b0f707
              e959624
              f35ce32
              5bab4bc
              231fa1e
              957737e
              965ee43
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| 
     | 
||
| import pytest | ||
| 
     | 
||
| from returns.future import Future, FutureResult | ||
| from returns.io import IO, IOResult | ||
| from returns.methods import gather | ||
| 
     | 
||
| 
     | 
||
| @pytest.mark.parametrize(('containers', 'expected'), [ | ||
| ( | ||
| ( | ||
| Future.from_value(1), | ||
| FutureResult.from_value(2), | ||
| FutureResult.from_failure(None), | ||
| ), | ||
| (IO(1), IOResult.from_value(2), FutureResult.from_failure(None)), | ||
| ), | ||
| ((), ()), | ||
| ]) | ||
| def test_gather(containers, expected): | ||
| """Test partition function.""" | ||
| assert gather(containers) == expected | ||
                
       | 
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's create a new file:
async_.pyand put it there.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is naming of the method good(gather)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeap