Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve test coverage #184

Open
tarkatronic opened this issue Apr 17, 2018 · 3 comments
Open

Improve test coverage #184

tarkatronic opened this issue Apr 17, 2018 · 3 comments
Assignees

Comments

@tarkatronic
Copy link
Collaborator

#164 is now nearly finished; there is only one file left, tests/xpath/00_pathhelper_base.py, and the actual efficacy of the tests is starting to become a little more evident. Overall, they're pretty good, but there definitely needs to be some improvement to help with efforts, such as Python 3 compatibility.

As of now, here is the current coverage of the tests:

Name                            Stmts   Miss Branch BrPart  Cover
-----------------------------------------------------------------
pyangbind/__init__.py               1      0      0      0   100%
pyangbind/helpers/__init__.py       0      0      0      0   100%
pyangbind/helpers/identity.py      95     95     40      0     0%
pyangbind/helpers/misc.py          25     25     16      0     0%
pyangbind/lib/__init__.py           0      0      0      0   100%
pyangbind/lib/base.py              59     12     44     11    76%
pyangbind/lib/pybindJSON.py       105     69     56      5    29%
pyangbind/lib/serialise.py        357     61    270     42    80%
pyangbind/lib/xpathhelper.py      192     26     94     23    83%
pyangbind/lib/yangtypes.py        813     87    378     54    87%
setup.py                           11      0      0      0   100%
-----------------------------------------------------------------
TOTAL                            1658    375    898    135    75%
@tarkatronic
Copy link
Collaborator Author

Codecov is reporting slightly less code coverage. I'm not entirely sure why the discrepancy. But this will give a good ruler for identifying the need here. https://codecov.io/gh/robshakir/pyangbind

@tarkatronic
Copy link
Collaborator Author

I believe this is currently blocked by mbj4668/pyang#325

Due to the way pyang is built, and these tests execute, we are currently unable to measure the coverage of the plugin itself, only the library which gets imported by the generated bindings.

@JoseIgnacioTamayo
Copy link
Collaborator

JoseIgnacioTamayo commented Feb 23, 2024

The repo is no longer publishing coverage to CodeCov.

Currently the Test coverage, after running the tests with 'tox' is:

coverage report
Name                            Stmts   Miss Branch BrPart  Cover
-----------------------------------------------------------------
pyangbind/__init__.py               1      0      0      0   100%
pyangbind/helpers/__init__.py       0      0      0      0   100%
pyangbind/helpers/identity.py      97     97     44      0     0%
pyangbind/helpers/misc.py          25     25     16      0     0%
pyangbind/lib/__init__.py           0      0      0      0   100%
pyangbind/lib/base.py              59     12     44     10    77%
pyangbind/lib/pybindJSON.py       103     69     54      4    28%
pyangbind/lib/serialise.py        517     82    338     51    80%
pyangbind/lib/xpathhelper.py      194     26     98     23    83%
pyangbind/lib/yangtypes.py        869     97    394     54    87%
-----------------------------------------------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants