Author lisroach
Recipients asvetlov, cjw296, ezio.melotti, lisroach, mariocj89, michael.foord, xtreak, yselivanov
Date 2019-09-12.14:04:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568297074.48.0.423650643303.issue38136@roundup.psfhosted.org>
In-reply-to
Content
Going to try to recap an in-person conversation:

There are some cases where calls are made separate from when they are awaited, for example:
   >>> call = foo()
   >>> await call

This would be 1 call and 1 await:

Call List   Await List
---------   ----------
[foo]        [call]

Calls like:
   >>> await foo()

Should also be counted as 1 call and 1 await, there is no difference between this call and the call above (expect for slight differences in when the lists are updated):

Call List   Await List
---------   ----------
[foo]        [call] 


If someone were to do this:

  >>>call_1 = foo()
  >>>call_2 = foo()

  >>> await call_1
  >>> await foo(x)

We should see 2 calls added to the call list, then 1 await added to the await list, then 1 call added to the call list and 1 await added to the await list. We would end up with 3 calls and 2 awaits. 

Call List              Await List
---------             ----------
[foo, foo, foo]        [call_1, foo]


And a call without an await:
 
  >>> call = foo()

Call List              Await List
---------             ----------
[foo]                 []



With a setup like this, we would keep the API the same (leaving in the assert_await*). There is some risk that users will incorrectly be using assert_call* when they really want to test awaits, but we can try to make to docs as clear as possible around this.
History
Date User Action Args
2019-09-12 14:04:34lisroachsetrecipients: + lisroach, cjw296, ezio.melotti, michael.foord, asvetlov, yselivanov, mariocj89, xtreak
2019-09-12 14:04:34lisroachsetmessageid: <1568297074.48.0.423650643303.issue38136@roundup.psfhosted.org>
2019-09-12 14:04:34lisroachlinkissue38136 messages
2019-09-12 14:04:34lisroachcreate