summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorscottbelden <scottabelden@gmail.com>2016-06-02 18:09:46 -0400
committerscottbelden <scottabelden@gmail.com>2016-06-02 18:09:46 -0400
commit4f4f050865fa42fd3ed0c1a99aec361860835bd3 (patch)
treec364d312a776e6d66824f092515a6ed38363d8e3 /tests
parent5c721b3491c4ad6972d4b1c443407bba33c27183 (diff)
downloadpython-coveragepy-4f4f050865fa42fd3ed0c1a99aec361860835bd3.tar.gz
Fix __main__.py showing up in help output
Diffstat (limited to 'tests')
-rw-r--r--tests/test_process.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_process.py b/tests/test_process.py
index 55dc3b1..e40c4dc 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -733,6 +733,15 @@ class ProcessTest(CoverageTest):
"Coverage.py warning: Module foo was previously imported, but not measured.\n"
)
+ def test_module_name(self):
+ if sys.version_info < (2, 7):
+ # Python 2.6 thinks that coverage is a package that can't be
+ # executed
+ self.skip("-m doesn't work the same < Python 2.7")
+ # https://bitbucket.org/ned/coveragepy/issues/478/help-shows-silly-program-name-when-running
+ out = self.run_command("python -m coverage")
+ self.assertIn("Use 'coverage help' for help", out)
+
class AliasedCommandTest(CoverageTest):
"""Tests of the version-specific command aliases."""