diff options
-rw-r--r-- | tests/test_cmdline.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py index a2c693a4..7ef474e0 100644 --- a/tests/test_cmdline.py +++ b/tests/test_cmdline.py @@ -3,6 +3,7 @@ """Test cmdline.py for coverage.py.""" +import os import pprint import re import sys @@ -644,7 +645,7 @@ class CmdLineStdoutTest(BaseCmdLineTest): def test_help_contains_command_name(self): # Command name should be present in help output. - fake_command_path = "lorem/ipsum/dolor" + fake_command_path = "lorem/ipsum/dolor".replace("/", os.sep) expected_command_name = "dolor" fake_argv = [fake_command_path, "sit", "amet"] with mock.patch.object(sys, 'argv', new=fake_argv): @@ -659,7 +660,7 @@ class CmdLineStdoutTest(BaseCmdLineTest): # has the `__main__.py` file's patch as the command name. Instead, the command name should # be derived from the package name. - fake_command_path = "lorem/ipsum/dolor/__main__.py" + fake_command_path = "lorem/ipsum/dolor/__main__.py".replace("/", os.sep) expected_command_name = "dolor" fake_argv = [fake_command_path, "sit", "amet"] with mock.patch.object(sys, 'argv', new=fake_argv): |