##// END OF EJS Templates
find_cmd is not using pywin32 for a while already
Nikita Kniazev -
Show More
@@ -44,23 +44,13 b' def test_find_cmd_ls():'
44 assert path.endswith("ls")
44 assert path.endswith("ls")
45
45
46
46
47 def has_pywin32():
47 @dec.skip_if_not_win32
48 try:
49 import win32api
50 except ImportError:
51 return False
52 return True
53
54
55 @dec.onlyif(has_pywin32, "This test requires win32api to run")
56 def test_find_cmd_pythonw():
48 def test_find_cmd_pythonw():
57 """Try to find pythonw on Windows."""
49 """Try to find pythonw on Windows."""
58 path = find_cmd('pythonw')
50 path = find_cmd('pythonw')
59 assert path.lower().endswith('pythonw.exe'), path
51 assert path.lower().endswith('pythonw.exe'), path
60
52
61
53
62 @dec.onlyif(lambda : sys.platform != 'win32' or has_pywin32(),
63 "This test runs on posix or in win32 with win32api installed")
64 def test_find_cmd_fail():
54 def test_find_cmd_fail():
65 """Make sure that FindCmdError is raised if we can't find the cmd."""
55 """Make sure that FindCmdError is raised if we can't find the cmd."""
66 pytest.raises(FindCmdError, find_cmd, "asdfasdf")
56 pytest.raises(FindCmdError, find_cmd, "asdfasdf")
General Comments 0
You need to be logged in to leave comments. Login now