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

Add unit tests #4

Closed
lupino3 opened this issue Nov 14, 2018 · 1 comment
Closed

Add unit tests #4

lupino3 opened this issue Nov 14, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@lupino3
Copy link
Member

lupino3 commented Nov 14, 2018

The script was published "as-is", but for any further change, and to validate existing behavior, we really need to add some basic tests.

lupino3 added a commit that referenced this issue Nov 15, 2018
This addresses partially #4, but I don't consider it sufficient for
closing it. The test coverage is 71%, and the printing feature
is not covered at all.
@lupino3 lupino3 added the enhancement New feature or request label Nov 28, 2018
lupino3 added a commit that referenced this issue Nov 28, 2018
Some small progress on #4, still not sufficient.
lupino3 added a commit that referenced this issue Dec 4, 2018
Split the large BuildCallGraph method into separate methods to 1) parse
the source and create nodes from blocks of code; 2) annotate nodes with
information coming from within the node; 3) annotate nodes with information coming
from the relationship between nodes.

As part of this, also add more unit tests  (helps with #4).
@lupino3
Copy link
Member Author

lupino3 commented Dec 7, 2018

Unit tests have been added over time.

Code coverage is above 90%:

$ coverage run -m unittest && coverage report
..................
----------------------------------------------------------------------
Ran 18 tests in 0.008s

OK 
Name                          Stmts   Miss  Cover
-------------------------------------------------
callgraph\__init__.py             0      0   100%
callgraph\callgraph.py          189     16    92%
tests\__init__.py                 0      0   100%
tests\test_graphbuilding.py     163      1    99%
-------------------------------------------------
TOTAL                           352     17    95%

I think this is satisfactory, therefore I am closing this issue.

@lupino3 lupino3 closed this as completed Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant