~landscape/zope3/ztk-1.1.3

« back to all changes in this revision

Viewing changes to src/twisted/test/test_shortcut.py

  • Committer: Andreas Hasenack
  • Date: 2009-07-20 17:49:16 UTC
  • Revision ID: andreas@canonical.com-20090720174916-g2tn6qmietz2hn0u
Revert twisted removal, it breaks several dozen tests [trivial]

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"""Test win32 shortcut script
 
2
"""
 
3
 
 
4
from twisted.trial import unittest
 
5
 
 
6
import os
 
7
if os.name == 'nt':
 
8
 
 
9
    from twisted.python import shortcut
 
10
    import os.path
 
11
    import sys
 
12
 
 
13
    class ShortcutTest(unittest.TestCase):
 
14
        def testCreate(self):
 
15
            s1=shortcut.Shortcut("test_shortcut.py")
 
16
            tempname=self.mktemp() + '.lnk'
 
17
            s1.save(tempname)
 
18
            self.assert_(os.path.exists(tempname))
 
19
            sc=shortcut.open(tempname)
 
20
            self.assert_(sc.GetPath(0)[0].endswith('test_shortcut.py'))