Makefile, Unittests and Lint

July 27, 2013 - 2 minute read -
makefile gsoc unittests

Commits

Makefile

I made a makefile to automate running py.test, coverage and pylint on the code. This is first time I am writing one :) The one i wrote assumes that py.test (with coverage.py plugin) and pylint is installed on your system.

For running py.test along with coverage:

make coverage
	

For running pylint over the code:

make lint
	

The result is generated as html files in a folder reports in the present working directory.

Linting the code

I ran pylint on my code. Ofc it gave a very huge list of warning/errors! Slowly, they were solved. I tried my best to remove those, but some of those just cannot be removed :) Running pylint using Makefile gives a better estimate of the situation.

Exceptions and Unittests

I also added exceptions and unittests for helper.py and testsource.py. Now the unittests part is almost complete with 100% coverage.

Others..

Some small changes were also made which are reflected from the git commit message history.

TODO:

  • Integration tests

Comments Section

Feel free to comment on the post but keep it clean and on topic.

blog comments powered by Disqus