#100 Produce a nice coverage report.
Merged 7 years ago by mikem. Opened 7 years ago by ralph.
ralph/koji html-report  into  master

file modified
+1
@@ -4,3 +4,4 @@ 

  .coverage

  docs/build/

  cli/kojic

+ htmlcov

file modified
+4
@@ -59,12 +59,16 @@ 

  	rm -f *.o *.so *.pyc *~ koji*.bz2 koji*.src.rpm

  	rm -rf koji-$(VERSION)

  	for d in $(SUBDIRS); do make -s -C $$d clean; done

+ 	coverage erase

  

  git-clean:

  	@git clean -d -q -x

  

  test:

  	PYTHONPATH=hub/.:plugins/hub/. nosetests --with-coverage --cover-package .

+ 	coverage erase

+ 	coverage html

+ 	@echo Coverage report in htmlcov/index.html

  

  subdirs:

  	for d in $(SUBDIRS); do make -C $$d; [ $$? = 0 ] || exit 1; done

It helps when writing tests... easier than parsing all that console output with your eyeballs.

I ran into a situation where old coverage data caused the command to fail. Perhaps we should run coverage erase first?

I note that nosetests has a --cover-html option.

Also, probably worth cleaning this up in make clean.

rebased

7 years ago

Thanks @mikem! I rebased based on your comments.

Commit dfaa593 fixes this pull-request

Pull-Request has been merged by mikem@redhat.com

7 years ago
Metadata