summaryrefslogtreecommitdiff
path: root/tests/test_cmdline.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2017-10-21 12:13:56 -0400
committerNed Batchelder <ned@nedbatchelder.com>2017-10-21 12:13:56 -0400
commit6b1a762095c322e8b41adfd561e22ea43aa3c449 (patch)
treeeff89b6a9be23e443f7eadaad0a0f53c96b341ce /tests/test_cmdline.py
parentb208f521fc4f2d56581e50a1450d710609897332 (diff)
downloadpython-coveragepy-6b1a762095c322e8b41adfd561e22ea43aa3c449.tar.gz
Fix the recent command-name tests for Windows
Diffstat (limited to 'tests/test_cmdline.py')
-rw-r--r--tests/test_cmdline.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py
index a2c693a..7ef474e 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):