Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / usr / lib / python2.7 / dist-packages / twisted / test / | server ip : 172.67.156.115 your ip : 172.70.80.236 H O M E |
Filename | /usr/lib/python2.7/dist-packages/twisted/test/test_shortcut.py |
Size | 804 |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 27-Apr-2025 09:56 |
Last modified | 03-Apr-2009 00:47 |
Last accessed | 27-Apr-2025 09:57 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
"""Test win32 shortcut script
"""
from twisted.trial import unittest
import os
if os.name == 'nt':
skipWindowsNopywin32 = None
try:
from twisted.python import shortcut
except ImportError:
skipWindowsNopywin32 = ("On windows, twisted.python.shortcut is not "
"available in the absence of win32com.")
import os.path
import sys
class ShortcutTest(unittest.TestCase):
def testCreate(self):
s1=shortcut.Shortcut("test_shortcut.py")
tempname=self.mktemp() + '.lnk'
s1.save(tempname)
self.assert_(os.path.exists(tempname))
sc=shortcut.open(tempname)
self.assert_(sc.GetPath(0)[0].endswith('test_shortcut.py'))
ShortcutTest.skip = skipWindowsNopywin32
"""
from twisted.trial import unittest
import os
if os.name == 'nt':
skipWindowsNopywin32 = None
try:
from twisted.python import shortcut
except ImportError:
skipWindowsNopywin32 = ("On windows, twisted.python.shortcut is not "
"available in the absence of win32com.")
import os.path
import sys
class ShortcutTest(unittest.TestCase):
def testCreate(self):
s1=shortcut.Shortcut("test_shortcut.py")
tempname=self.mktemp() + '.lnk'
s1.save(tempname)
self.assert_(os.path.exists(tempname))
sc=shortcut.open(tempname)
self.assert_(sc.GetPath(0)[0].endswith('test_shortcut.py'))
ShortcutTest.skip = skipWindowsNopywin32