[qmtest] [PATCH] Add more annotations to QMTest runs
Mark Mitchell
mark at codesourcery.com
Thu Feb 12 01:57:31 UTC 2004
Zack Weinberg wrote:
>Mark Mitchell <mark at codesourcery.com> writes:
>
>
>
>>>+ # 'getpass' doesn't necessarily work on Windows, so if that fails,
>>>+ # try the win32 function.
>>>+ try:
>>>+ import win32api
>>>
>>>
>>>
>>>
>>I'm a little bit afraid that we could some how get here under UNIX,
>>and then try to import this module, which might cause weird things
>>to happen. Perhaps we could assert that doesn't happen, or
>>condition this whole block on sys.platform the way we do elsewhere
>>in QMTest?
>>
>>
>
>The import is wrapped in a try: ... except ImportError: block, which
>should be adequate defense against getting here under Unix.
>
>
I wasn't sure about that. Some modules can be loaded under a "wrong"
OS, but then blow up when you try to use them. I suppose win32api will
fail hard at import-time, but I wasn't 100% sure.
Thanks,
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark at codesourcery.com
More information about the qmtest
mailing list