當前位置: 首頁>>代碼示例>>Python>>正文


Python macostools.mkalias方法代碼示例

本文整理匯總了Python中macostools.mkalias方法的典型用法代碼示例。如果您正苦於以下問題:Python macostools.mkalias方法的具體用法?Python macostools.mkalias怎麽用?Python macostools.mkalias使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在macostools的用法示例。


在下文中一共展示了macostools.mkalias方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_mkalias

# 需要導入模塊: import macostools [as 別名]
# 或者: from macostools import mkalias [as 別名]
def test_mkalias(self):
        test_support.unlink(TESTFN2)
        macostools.mkalias(test_support.TESTFN, TESTFN2)
        fss, _, _ = Carbon.File.ResolveAliasFile(TESTFN2, 0)
        self.assertEqual(fss.as_pathname(), os.path.realpath(test_support.TESTFN)) 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:7,代碼來源:test_macostools.py

示例2: test_mkalias_relative

# 需要導入模塊: import macostools [as 別名]
# 或者: from macostools import mkalias [as 別名]
def test_mkalias_relative(self):
        test_support.unlink(TESTFN2)

        macostools.mkalias(test_support.TESTFN, TESTFN2, sys.prefix)
        fss, _, _ = Carbon.File.ResolveAliasFile(TESTFN2, 0)
        self.assertEqual(fss.as_pathname(), os.path.realpath(test_support.TESTFN)) 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:8,代碼來源:test_macostools.py

示例3: test_mkalias

# 需要導入模塊: import macostools [as 別名]
# 或者: from macostools import mkalias [as 別名]
def test_mkalias(self):
            test_support.unlink(TESTFN2)
            macostools.mkalias(test_support.TESTFN, TESTFN2)
            fss, _, _ = Carbon.File.ResolveAliasFile(TESTFN2, 0)
            self.assertEqual(fss.as_pathname(), os.path.realpath(test_support.TESTFN)) 
開發者ID:dxwu,項目名稱:BinderFilter,代碼行數:7,代碼來源:test_macostools.py

示例4: test_mkalias_relative

# 需要導入模塊: import macostools [as 別名]
# 或者: from macostools import mkalias [as 別名]
def test_mkalias_relative(self):
            test_support.unlink(TESTFN2)
            # If the directory doesn't exist, then chances are this is a new
            # install of Python so don't create it since the user might end up
            # running ``sudo make install`` and creating the directory here won't
            # leave it with the proper permissions.
            if not os.path.exists(sys.prefix):
                return
            macostools.mkalias(test_support.TESTFN, TESTFN2, sys.prefix)
            fss, _, _ = Carbon.File.ResolveAliasFile(TESTFN2, 0)
            self.assertEqual(fss.as_pathname(), os.path.realpath(test_support.TESTFN)) 
開發者ID:dxwu,項目名稱:BinderFilter,代碼行數:13,代碼來源:test_macostools.py

示例5: test_mkalias

# 需要導入模塊: import macostools [as 別名]
# 或者: from macostools import mkalias [as 別名]
def test_mkalias(self):
        try:
            os.unlink(TESTFN2)
        except:
            pass
        macostools.mkalias(test_support.TESTFN, TESTFN2)
        fss, _, _ = Carbon.File.ResolveAliasFile(TESTFN2, 0)
        self.assertEqual(fss.as_pathname(), os.path.realpath(test_support.TESTFN)) 
開發者ID:ofermend,項目名稱:medicare-demo,代碼行數:10,代碼來源:test_macostools.py

示例6: test_mkalias_relative

# 需要導入模塊: import macostools [as 別名]
# 或者: from macostools import mkalias [as 別名]
def test_mkalias_relative(self):
        try:
            os.unlink(TESTFN2)
        except:
            pass
        # If the directory doesn't exist, then chances are this is a new
        # install of Python so don't create it since the user might end up
        # running ``sudo make install`` and creating the directory here won't
        # leave it with the proper permissions.
        if not os.path.exists(sys.prefix):
            return
        macostools.mkalias(test_support.TESTFN, TESTFN2, sys.prefix)
        fss, _, _ = Carbon.File.ResolveAliasFile(TESTFN2, 0)
        self.assertEqual(fss.as_pathname(), os.path.realpath(test_support.TESTFN)) 
開發者ID:ofermend,項目名稱:medicare-demo,代碼行數:16,代碼來源:test_macostools.py


注:本文中的macostools.mkalias方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。