Merge lp:~jspashett/bzr/missing_win32api_for_test into lp:bzr

Proposed by Jason Spashett
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: 5316
Proposed branch: lp:~jspashett/bzr/missing_win32api_for_test
Merge into: lp:bzr
Diff against target: 19 lines (+2/-0)
1 file modified
bzrlib/tests/test_win32utils.py (+2/-0)
To merge this branch: bzr merge lp:~jspashett/bzr/missing_win32api_for_test
Reviewer Review Type Date Requested Status
bzr-core Pending
Review via email: mp+28220@code.launchpad.net

Commit message

Skip test_wordpad on win32 when the win32api is not present.

Description of the change

Test test_wordpad requires win32api module which isn't present on my system hence the test failes.
Added a feature requirement for this test to skip it if win32api not present.

This test calls get_app_path which is what requires win32api.

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/tests/test_win32utils.py'
2--- bzrlib/tests/test_win32utils.py 2010-05-20 02:57:52 +0000
3+++ bzrlib/tests/test_win32utils.py 2010-06-22 17:30:49 +0000
4@@ -54,6 +54,7 @@
5 Win32RegistryFeature = _RequiredModuleFeature('_winreg')
6 CtypesFeature = _RequiredModuleFeature('ctypes')
7 Win32comShellFeature = _RequiredModuleFeature('win32com.shell')
8+Win32ApiFeature = _RequiredModuleFeature('win32api')
9
10
11 # Tests
12@@ -189,6 +190,7 @@
13 # typical windows users should have wordpad in the system
14 # but there is problem: its path has the format REG_EXPAND_SZ
15 # so naive attempt to get the path is not working
16+ self.requireFeature(Win32ApiFeature)
17 for a in ('wordpad', 'wordpad.exe'):
18 p = get_app_path(a)
19 d, b = os.path.split(p)