bpo-39915: Ensure await_args_list is updated according to the order in which coroutines were awaited (GH-18924)

Create call objects with awaited arguments instead of using call_args which has only last call value.
This commit is contained in:
Karthikeyan Singaravelan 2020-03-11 20:36:12 +05:30 committed by GitHub
parent fde44ae6d0
commit e553f204bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 1 deletions

View file

@ -2171,7 +2171,7 @@ class AsyncMockMixin(Base):
# This is nearly just like super(), except for special handling
# of coroutines
_call = self.call_args
_call = _Call((args, kwargs), two=True)
self.await_count += 1
self.await_args = _call
self.await_args_list.append(_call)