[TIP] Disable keyboard shortcuts in html coverage reports?

Thomi Richards thomi.richards at canonical.com
Sun Mar 2 13:37:29 PST 2014


Hi Ned,


> Thomi, I don't see this issue on Mac 10.8 or on Precise in either Firefox
> or Chrome.
>


I looked into this some more, my findings are below:

If you're using the Ubuntu distribution packages, the Precise package is
coverage version 3.6, and trusty is 3.7. There are some distro-patches in
the Ubuntu packages, the most suspicious one replaces the JS files packaged
with coverage with ones from the distribution JS library. *However*, I can
get this to break with the version of coverage from pypi as well (see
below).

I've managed to track the problem down to the 'jquery.hotkeys.js' file. In
Precise this is version '0.8', in trusty it's '0.8+'. If I replace that
file with the version from precise then everything works again. The diff is
reasonably small, but my JS skills aren't up to the task of debugging
exactly where is the issue is.

I've created a simple bash script that will reproduce the issue:

https://gist.github.com/thomir/9314320

download to 'reproducer.sh' and either run:

./reproducer.sh -fail

to open the web browser in an html coverage report that exhibits the bug,
or run without '-fail' to open the browser in a report that works as
expected. To see the bug, open one of the file reports, and press the 'Alt'
key. In the failing version, the alt key triggers all the line highlights.

Please let me know if I can do anything else to help track down this bug.
Hopefully with the above script you can reproduce it as well.

Cheers,

-- 
Thomi Richards
thomi.richards at canonical.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20140303/a8effbe5/attachment.html>


More information about the testing-in-python mailing list