[Pkg-javascript-devel] Bug#740893: libjs-jquery-hotkeys: jquery.hotkeys changes break python-coverage html reports.
Thomi Richards
thomi.richards at canonical.com
Wed Mar 5 22:13:16 UTC 2014
Package: libjs-jquery-hotkeys
Version: 0~20130707+git2d51e3a9+dfsg-2
Severity: normal
Dear Maintainer,
The python-coverage and python3-coverage packages use jquery.hotkeys to
bind shortcut keys for HTML coverage reports. The upstream coverage project
will use javascript libraries found in /usr/share/javascript/, and falls
back to their own, vendorised copies.
The Debian package is based on https://github.com/jeresig/jquery.hotkeys,
but seems to include several changes unique to the Debian version.
Specifically this revision:
http://anonscm.debian.org/gitweb/?p=pkg-javascript/libjs-jquery-hotkeys.git;a=commit;h=479c001b064494cb1f76304f82e870bebb69f879
was the last revision that works with coverage.py. All later revisions fail
- they either do not trigger any action when the key is pressed, or they
trigger all actions (depending on the specific version tested).
This can be easily tested with this simple bash script:
--<code>--
#!/bin/sh -ex
if [ -d reproducer_ve ]; then
rm -r reproducer_ve
fi
virtualenv reproducer_ve
. reproducer_ve/bin/activate
pip install coverage
cat > foo.py <<EOF
def bar(a, b):
if a < 0:
return a + b
return a - b
EOF
cat > test_foo.py <<EOF
from foo import bar
from unittest import TestCase
class FooTests(TestCase):
def test_bar(self):
bar(1, 2)
EOF
coverage run -m unittest test_foo
coverage html
xdg-open htmlcov/index.html
--</code>--
To reproduce, open the report for the 'foo' module, and try pressing an
unbound key (like 'alt', for example). In the current package, all actions
will be triggered.
Note: The above script uses 'pip' + 'virtualenv', but the same behavior is
present in the 'python-coverage' and 'python3-coverage' packages. I use pip
in the script above since it means I don't need root to install the package.
I'm not a JS developer, so I'm not able to easily tell what the exact issue
is in the latest package, but the diff between the version that works and
the version(s) that don't is relatively small, so hopefully someone can
figure out what's wrong.
Please let me know if I've forgotten to include any important information.
I'm happy to help get this fixed.
Cheers,
-- System Information:
Debian Release: jessie/sid
APT prefers trusty-updates
APT policy: (500, 'trusty-updates'), (500, 'trusty-security'), (500,
'trusty'), (100, 'trusty-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.13.0-12-generic (SMP w/8 CPU cores)
Locale: LANG=en_NZ.UTF-8, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libjs-jquery-hotkeys depends on:
ii dpkg 1.17.5ubuntu4
ii libjs-jquery 1.7.2+dfsg-2ubuntu1
Versions of packages libjs-jquery-hotkeys recommends:
ii javascript-common 11
libjs-jquery-hotkeys suggests no packages.
-- no debconf information
--
Thomi Richards
thomi.richards at canonical.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-javascript-devel/attachments/20140306/99c86b65/attachment.html>
More information about the Pkg-javascript-devel
mailing list