python-trio / async_generator

Making it easy to write async iterators in Python 3.5
Other
95 stars 24 forks source link

Adapt to trio norms + add @asynccontextmanager + add sphinx docs #9

Closed njsmith closed 6 years ago

codecov[bot] commented 6 years ago

Codecov Report

Merging #9 into master will increase coverage by 8.12%. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master     #9      +/-   ##
========================================
+ Coverage   91.87%   100%   +8.12%     
========================================
  Files           5      7       +2     
  Lines         591    776     +185     
  Branches       48     59      +11     
========================================
+ Hits          543    776     +233     
+ Misses         48      0      -48
Impacted Files Coverage Δ
async_generator/_impl.py 100% <ø> (ø)
async_generator/_util.py 100% <100%> (ø)
async_generator/_tests/test_util.py 100% <100%> (ø)
async_generator/__init__.py 100% <100%> (+100%) :arrow_up:
async_generator/_tests/test_async_generator.py 100% <100%> (ø)
async_generator/_tests/conftest.py 100% <100%> (ø)
async_generator/_version.py 100% <100%> (ø)
... and 2 more

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 339fc63...a1974c6. Read the comment docs.

njsmith commented 6 years ago

I cannot figure out why the coverage here is so messed up. We're using exactly the same scripts as trio. Yet for some reason it looks like the coverage gathering is only getting turned on after we import the module, so all the lines that are executed on import show up as being not-covered.

njsmith commented 6 years ago

AHHHH hahaha I figured it out.

We use pytest-asyncio as a convenient way to run async functions.

pytest-asyncio at some point... started using this library! So if pytest happens to load the pytest-asyncio plugin before it loads the pytest-cov plugin, then we get imported then too.

Also it's kind of bad if our testing infrastructure indirectly depends on the code-under-test, we should probably fix that anyway.