1 """Test win32 shortcut script
4 from twisted.trial import unittest
9 skipWindowsNopywin32 = None
11 from twisted.python import shortcut
13 skipWindowsNopywin32 = ("On windows, twisted.python.shortcut is not "
14 "available in the absence of win32com.")
18 class ShortcutTest(unittest.TestCase):
20 s1=shortcut.Shortcut("test_shortcut.py")
21 tempname=self.mktemp() + '.lnk'
23 self.assert_(os.path.exists(tempname))
24 sc=shortcut.open(tempname)
25 self.assert_(sc.GetPath(0)[0].endswith('test_shortcut.py'))
26 ShortcutTest.skip = skipWindowsNopywin32