summaryrefslogtreecommitdiff
path: root/coverage/codeunit.py
diff options
context:
space:
mode:
authorGeoff Bache <devnull@localhost>2010-12-10 21:34:14 +0100
committerGeoff Bache <devnull@localhost>2010-12-10 21:34:14 +0100
commit6c11dfddefa31121cb92a103296e133ad5c4d14f (patch)
treed68b601babeb9cdc458368f8d38fa82c8898efed /coverage/codeunit.py
parent24567ee88042326542fff3e86c183c63576e64d1 (diff)
downloadpython-coveragepy-6c11dfddefa31121cb92a103296e133ad5c4d14f.tar.gz
Handle compiled files under Jython
Diffstat (limited to 'coverage/codeunit.py')
-rw-r--r--coverage/codeunit.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/coverage/codeunit.py b/coverage/codeunit.py
index dfc4560..ac90cb2 100644
--- a/coverage/codeunit.py
+++ b/coverage/codeunit.py
@@ -54,6 +54,8 @@ class CodeUnit(object):
# .pyc files should always refer to a .py instead.
if f.endswith('.pyc'):
f = f[:-1]
+ elif f.endswith('$py.class'): # jython
+ f = f[:-9] + ".py"
self.filename = self.file_locator.canonical_filename(f)
if hasattr(morf, '__name__'):