From 899192b5bf5303b5308e9d90a14ccf424eb2efe5 Mon Sep 17 00:00:00 2001 From: scottbelden Date: Thu, 2 Jun 2016 18:09:46 -0400 Subject: Fix __main__.py showing up in help output --- tests/test_process.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/test_process.py b/tests/test_process.py index 55dc3b13..e40c4dcb 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.""" -- cgit v1.2.1