1. Ned Batchelder
  2. coverage.py
  3. Issues
Issue #100 resolved

Source directive doesn't work for packages under Jython

Geoff Bache
created an issue

In my rc file, I write

{{{

[run] source = mypackage

}}}

but this fails under Jython, because {{{file}}} returns something like {{{

/path/to/site-packages/mypackage/init$py.class

}}} and there is no code for handling this in _check_for_packages or _source_for_file.

The line

{{{

if f.startswith('init.'):

}}}

returns the wrong answer, and a Jython case needs adding to _source_for_file.

Comments (7)

  1. Log in to comment