コード例 #1
0
 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)
コード例 #2
0
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()
コード例 #3
0
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_ttk']))
コード例 #4
0
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()
コード例 #5
0
def test_main():
    with test_support.DirsOnSysPath(lib_tk_test):
        test_support.run_unittest(
            *runtktests.get_tests(gui=False, packages=['test_ttk']))
コード例 #6
0
import os
from test import test_support

# Skip this test if _tkinter does not exist.
test_support.import_module('_tkinter')

this_dir = os.path.dirname(os.path.abspath(__file__))
lib_tk_test = os.path.abspath(os.path.join(this_dir, '..', 'lib-tk', 'test'))

with test_support.DirsOnSysPath(lib_tk_test):
    import runtktests

def test_main():
    with test_support.DirsOnSysPath(lib_tk_test):
        test_support.run_unittest(
            *runtktests.get_tests(gui=False, packages=['test_ttk']))

if __name__ == '__main__':
    test_main()
コード例 #7
0
 def test_bug1126(self):
     jar = test_support.findfile("bug1126.jar", subdir="bug1126")
     with test_support.DirsOnSysPath(jar):
         import org.subpackage
コード例 #8
0
 def test_bug1239(self):
     jar = test_support.findfile("bug1239.jar")
     with test_support.DirsOnSysPath(jar):
         import org.test403javapackage.test403
コード例 #9
0
 def test_bug1126(self):
     with test_support.DirsOnSysPath("Lib/test/bug1126/bug1126.jar"):
         import org.subpackage
コード例 #10
0
 def test_bug1239(self):
     with test_support.DirsOnSysPath("Lib/test/bug1239.jar"):
         import org.test403javapackage.test403