Created
April 24, 2020 15:10
-
-
Save wbadart/25a110ff1ef5b8160c6a6c7a0449e266 to your computer and use it in GitHub Desktop.
Coverage bug for numba-jit'd functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: numbatest | |
channels: | |
- defaults | |
dependencies: | |
- _libgcc_mutex=0.1=main | |
- attrs=19.3.0=py_0 | |
- blas=1.0=mkl | |
- ca-certificates=2020.1.1=0 | |
- certifi=2020.4.5.1=py38_0 | |
- coverage=5.0=py38h7b6447c_0 | |
- intel-openmp=2020.0=166 | |
- ld_impl_linux-64=2.33.1=h53a641e_7 | |
- libedit=3.1.20181209=hc058e9b_0 | |
- libffi=3.2.1=hd88cf55_4 | |
- libgcc-ng=9.1.0=hdf63c60_0 | |
- libgfortran-ng=7.3.0=hdf63c60_0 | |
- libstdcxx-ng=9.1.0=hdf63c60_0 | |
- llvmlite=0.32.0=py38hd408876_0 | |
- mkl=2020.0=166 | |
- mkl-service=2.3.0=py38he904b0f_0 | |
- mkl_fft=1.0.15=py38ha843d7b_0 | |
- mkl_random=1.1.0=py38h962f231_0 | |
- more-itertools=8.2.0=py_0 | |
- ncurses=6.2=he6710b0_0 | |
- numba=0.49.0=py38h0573a6f_0 | |
- numpy=1.18.1=py38h4f9e942_0 | |
- numpy-base=1.18.1=py38hde5b4d6_1 | |
- openssl=1.1.1g=h7b6447c_0 | |
- packaging=20.3=py_0 | |
- pip=20.0.2=py38_1 | |
- pluggy=0.13.1=py38_0 | |
- py=1.8.1=py_0 | |
- pyparsing=2.4.6=py_0 | |
- pytest=5.4.1=py38_0 | |
- python=3.8.2=hcf32534_0 | |
- readline=8.0=h7b6447c_0 | |
- setuptools=46.1.3=py38_0 | |
- six=1.14.0=py38_0 | |
- sqlite=3.31.1=h62c20be_1 | |
- tbb=2020.0=hfd86e86_0 | |
- tk=8.6.8=hbc83047_0 | |
- wcwidth=0.1.9=py_0 | |
- wheel=0.34.2=py38_0 | |
- xz=5.2.5=h7b6447c_0 | |
- zlib=1.2.11=h7b6447c_3 | |
prefix: /home/wbadar/workspace/.miniconda3/envs/numbatest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numba | |
@numba.jit | |
def foo(a, b): | |
return a + b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
coverage run -m pytest test_foo.py | |
coverage report -m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from foo import foo | |
def test_foo(): | |
a = 1 | |
b = 2 | |
assert foo(a, b) == 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment