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


Python test_support.DirsOnSysPath方法代碼示例

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


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

示例1: test_main

# 需要導入模塊: from test import test_support [as 別名]
# 或者: from test.test_support import DirsOnSysPath [as 別名]
def test_main():
    with test_support.DirsOnSysPath(lib_tk_test):
        test_support.run_unittest(
            *runtktests.get_tests(text=False, packages=['test_ttk'])) 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:6,代碼來源:test_ttk_guionly.py

示例2: test_main

# 需要導入模塊: from test import test_support [as 別名]
# 或者: from test.test_support import DirsOnSysPath [as 別名]
def test_main():
    with test_support.DirsOnSysPath(lib_tk_test):
        test_support.run_unittest(
            *runtktests.get_tests(gui=False, packages=['test_ttk'])) 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:6,代碼來源:test_ttk_textonly.py

示例3: test_main

# 需要導入模塊: from test import test_support [as 別名]
# 或者: from test.test_support import DirsOnSysPath [as 別名]
def test_main():
    with test_support.DirsOnSysPath(lib_tk_test):
        test_support.run_unittest(
            *runtktests.get_tests(text=False, packages=['test_tkinter'])) 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:6,代碼來源:test_tk.py

示例4: test_main

# 需要導入模塊: from test import test_support [as 別名]
# 或者: from test.test_support import DirsOnSysPath [as 別名]
def test_main(enable_gui=False):
    if enable_gui:
        if test_support.use_resources is None:
            test_support.use_resources = ['gui']
        elif 'gui' not in test_support.use_resources:
            test_support.use_resources.append('gui')

    with test_support.DirsOnSysPath(lib_tk_test):
        from test_ttk.support import get_tk_root
        try:
            test_support.run_unittest(
                *runtktests.get_tests(text=False, packages=['test_ttk']))
        finally:
            get_tk_root().destroy() 
開發者ID:dxwu,項目名稱:BinderFilter,代碼行數:16,代碼來源:test_ttk_guionly.py

示例5: test_main

# 需要導入模塊: from test import test_support [as 別名]
# 或者: from test.test_support import DirsOnSysPath [as 別名]
def test_main(enable_gui=False):
    if enable_gui:
        if test_support.use_resources is None:
            test_support.use_resources = ['gui']
        elif 'gui' not in test_support.use_resources:
            test_support.use_resources.append('gui')

    with test_support.DirsOnSysPath(lib_tk_test):
        test_support.run_unittest(
            *runtktests.get_tests(text=False, packages=['test_tkinter'])) 
開發者ID:dxwu,項目名稱:BinderFilter,代碼行數:12,代碼來源:test_tk.py

示例6: test_main

# 需要導入模塊: from test import test_support [as 別名]
# 或者: from test.test_support import DirsOnSysPath [as 別名]
def test_main():
    with test_support.DirsOnSysPath(lib_tk_test):
        from test_ttk.support import get_tk_root
        try:
            test_support.run_unittest(
                *runtktests.get_tests(text=False, packages=['test_ttk']))
        finally:
            get_tk_root().destroy() 
開發者ID:gcblue,項目名稱:gcblue,代碼行數:10,代碼來源:test_ttk_guionly.py

示例7: test_bug1239

# 需要導入模塊: from test import test_support [as 別名]
# 或者: from test.test_support import DirsOnSysPath [as 別名]
def test_bug1239(self):
        jar = test_support.findfile("bug1239.jar")
        with test_support.DirsOnSysPath(jar):
            import org.test403javapackage.test403

    # different from test_bug1239 in that only a Java package is imported, not
    # a Java class.  I'd also like to get rid of this checked in test jar. 
開發者ID:Acmesec,項目名稱:CTFCrackTools-V2,代碼行數:9,代碼來源:test_classpathimporter.py

示例8: test_bug1126

# 需要導入模塊: from test import test_support [as 別名]
# 或者: from test.test_support import DirsOnSysPath [as 別名]
def test_bug1126(self):
        jar = test_support.findfile("bug1126.jar", subdir="bug1126")
        with test_support.DirsOnSysPath(jar):
            import org.subpackage 
開發者ID:Acmesec,項目名稱:CTFCrackTools-V2,代碼行數:6,代碼來源:test_classpathimporter.py

示例9: test_path_in_pyclasspath

# 需要導入模塊: from test import test_support [as 別名]
# 或者: from test.test_support import DirsOnSysPath [as 別名]
def test_path_in_pyclasspath(self):
        jar = self.prepareJar('classimport_Lib.jar')
        compiled = self.compileToJar(jar, 'Lib')
        Thread.currentThread().contextClassLoader = test_support.make_jar_classloader(jar)
        with test_support.DirsOnSysPath():
            sys.path = ['__pyclasspath__/Lib']
            self.checkImports('__pyclasspath__/Lib', compiled) 
開發者ID:Acmesec,項目名稱:CTFCrackTools-V2,代碼行數:9,代碼來源:test_classpathimporter.py


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