This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
README | Tue Oct 20 05:31:38 -0700 2009 | |
| |
cov2emacs/ | Wed Oct 21 10:14:52 -0700 2009 | |
| |
pycoverage.el | Tue Sep 01 13:29:01 -0700 2009 |
README
pycoverage.el
=============
An emacs mode for reporting on coverage stats for python
Dependencies
============
Coverage reporter for Python:
* coverage.py (currently we only support this)
* figleaf (support pending)
Installation
============
Load pycoverage.el
Install cov2emacs using setuptools or virtualenv or distutils
There should be ``.coverage`` file in the directory of the module you
want coverage reporting on (or the parents of that directory). How
you get it there is currently not solved by this tool, which only
provides a way to view the coverage data in your editor.
Flymake-mode usage
=====================
Add the following to your .emacs::
(when (load "flymake" t)
(defun flymake-pycoverage-init ()
(list "cov2emacs" (list "--flymake" "--python-file" buffer-file-name))
)
(add-to-list 'flymake-allowed-file-name-masks
'("\\.py\\'" flymake-pycoverage-init)))
Then run this on a file that has up to date coverage information for it.
M-x flymake-mode
This will look for a ``.coverage`` file in the same directory (or the
parents) of the buffer. And it should highlight the missing lines
Running
=======
M-x pycoverage-mode
M-x pycoverage-load-report
Ideal Usage
===========
One runs their tests using coverage. Then they enter
``pycoverage-mode``. That should look for a ``.coverage`` file (or
the figleaf equivalent) and load the overview/results page in another
buffer. It will also highlight the current file (iff it's timestamp
is <= ``.coverage`` timestamp. Newer timestamp means no guarantees on
output.) with coverage information.
Todo
====
* Make it work!
* Use flymake mode instead of/in combination with compile mode? - Initial Flymake DONE
* Use missing line numbers instead of covered lines - DONE for coverage.py
* Make pycoverage-load-report look for a ``.coverage`` file
recursively up the parents of the file - DONE
* Make ``cov2emacs`` accept location of ``.coverage`` file - DONE
* Make report use normal coverage.py text output, since it's a
little friendlier on the eyes (instead of reporting for every
group of lines in a file)
* Figleaf support
* Nose integration?
Thanks
======
* rcov - for code to start from






