Closed Yay295 closed 7 years ago
Merging #47 into master will decrease coverage by
<.01%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #47 +/- ##
==========================================
- Coverage 99.31% 99.31% -0.01%
==========================================
Files 5 5
Lines 436 435 -1
Branches 119 119
==========================================
- Hits 433 432 -1
Misses 2 2
Partials 1 1
Impacted Files | Coverage Δ | |
---|---|---|
bottom/client.py | 98.95% <100%> (+0.01%) |
:arrow_up: |
bottom/pack.py | 100% <0%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update bab0f3b...16c8054. Read the comment docs.
I'm not really sure how to make a test, but I think it should look something like that. Though not exactly that apparently.
I'll pull that down and see if I can fix it. The structure looks correct from here..
Sneaky! Needs a nonlocal
(and an extra space before the function definition for flake8).
Can you allow changes for pull requests or change the function to the following?
def test_wait_return_value(client, flush):
""" The value returned should be the same as the value given. """
event_name = "test_wait_return_value"
returned_name = ""
async def waiter():
nonlocal returned_name
returned_name = await client.wait(event_name)
client.loop.create_task(waiter())
flush()
client.trigger(event_name)
flush()
assert returned_name is event_name
Woo! Thanks for the enhancement :)
Not particularly useful on it's own, but very useful when using the
wait_for
function as implemented inexamples/common.py
.