diff options
author | Dirk Thomas <dthomas@osrfoundation.org> | 2016-10-17 14:12:10 -0700 |
---|---|---|
committer | Dirk Thomas <dthomas@osrfoundation.org> | 2016-10-17 14:12:10 -0700 |
commit | b2f19c1ed21629d5383532cfb2a77be9a7389ea4 (patch) | |
tree | ad441c37f8d07c0fd745c272991685b7ad13d596 /coverage/python.py | |
parent | 450b09e15f34c240dea528ddbfb907aa264ccf0d (diff) | |
download | python-coveragepy-b2f19c1ed21629d5383532cfb2a77be9a7389ea4.tar.gz |
fix name for module in __init__.py filefix_init_name
Diffstat (limited to 'coverage/python.py')
-rw-r--r-- | coverage/python.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/coverage/python.py b/coverage/python.py index 601318c..7109ece 100644 --- a/coverage/python.py +++ b/coverage/python.py @@ -118,7 +118,10 @@ class PythonFileReporter(FileReporter): if hasattr(morf, '__name__'): name = morf.__name__ - name = name.replace(".", os.sep) + ".py" + name = name.replace(".", os.sep) + if filename.endswith('__init__.py'): + name += os.sep + '__init__' + name += '.py' name = files.unicode_filename(name) else: name = files.relative_filename(filename) |