当前位置: 首页>>代码示例>>Python>>正文


Python tests.suite函数代码示例

本文整理汇总了Python中tests.suite函数的典型用法代码示例。如果您正苦于以下问题:Python suite函数的具体用法?Python suite怎么用?Python suite使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了suite函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: run

 def run(self):
     from openerp.tools import config
     config.options['db_user'] = 'postgres'
     config.options['db_host'] = 'localhost'
     config.options['db_port'] = 5432
     from tests import suite
     unittest.TextTestRunner(verbosity=3).run(suite())
开发者ID:openlabs,项目名称:itsbroken,代码行数:7,代码来源:setup.py

示例2: run

    def run(self):
        from trytond.config import CONFIG
        CONFIG['db_type'] = 'postgresql'
        CONFIG['db_host'] = 'localhost'
        CONFIG['db_port'] = 5432
        CONFIG['db_user'] = 'postgres'
        CONFIG['timezone'] = 'UTC'

        from trytond import backend
        import trytond.tests.test_tryton

        # Set the db_type again because test_tryton writes this to sqlite
        # again
        CONFIG['db_type'] = 'postgresql'

        trytond.tests.test_tryton.DB_NAME = 'test_' + str(int(time.time()))
        from trytond.tests.test_tryton import DB_NAME
        trytond.tests.test_tryton.DB = backend.get('Database')(DB_NAME)
        from trytond.pool import Pool
        Pool.test = True
        trytond.tests.test_tryton.POOL = Pool(DB_NAME)

        from tests import suite
        test_result = unittest.TextTestRunner(verbosity=3).run(suite())

        if test_result.wasSuccessful():
            sys.exit(0)
        sys.exit(-1)
开发者ID:rahulsukla,项目名称:nereid,代码行数:28,代码来源:setup.py

示例3: run

    def run(self):
        # Set timezone in environment.
        os.environ['TZ'] = 'UTC'

        def set_config():
            from trytond.config import CONFIG
            CONFIG['db_type'] = 'postgresql'
            CONFIG['db_host'] = 'localhost'
            CONFIG['db_port'] = 5432
            CONFIG['db_user'] = 'postgres'

        from trytond.backend.postgresql import Database
        import trytond.tests.test_tryton

        # Needed for the database loader to load correctly
        set_config()

        trytond.tests.test_tryton.DB_NAME = 'test_' + str(int(time.time()))
        from trytond.tests.test_tryton import DB_NAME
        trytond.tests.test_tryton.DB = Database(DB_NAME)
        from trytond.pool import Pool
        Pool.test = True
        trytond.tests.test_tryton.POOL = Pool(DB_NAME)

        from tests import suite
        test_result = unittest.TextTestRunner(verbosity=3).run(suite())

        if test_result.wasSuccessful():
            sys.exit(0)
        sys.exit(-1)
开发者ID:sharoonthomas,项目名称:email-queue,代码行数:30,代码来源:setup.py

示例4: run

    def run(self):
        # Set timezone in environment.
        os.environ['TZ'] = 'UTC'

        def set_config():
            os.environ['TRYTOND_DATABASE_URI'] = 'postgresql://'

        from trytond.backend.postgresql import Database
        import trytond.tests.test_tryton

        # Needed for the database loader to load correctly
        set_config()

        trytond.tests.test_tryton.DB_NAME = 'test_' + str(int(time.time()))
        from trytond.tests.test_tryton import DB_NAME
        trytond.tests.test_tryton.DB = Database(DB_NAME)
        from trytond.pool import Pool
        Pool.test = True
        trytond.tests.test_tryton.POOL = Pool(DB_NAME)

        from tests import suite
        test_result = unittest.TextTestRunner(verbosity=3).run(suite())

        if test_result.wasSuccessful():
            sys.exit(0)
        sys.exit(-1)
开发者ID:2cadz,项目名称:nereid-payment-gateway,代码行数:26,代码来源:setup.py

示例5: run

    def run(self):
        os.environ['DB_NAME'] = ':memory:'

        from tests import suite
        test_result = unittest.TextTestRunner(verbosity=3).run(suite())

        if test_result.wasSuccessful():
            sys.exit(0)
        sys.exit(-1)
开发者ID:openlabs,项目名称:trytond-shipping,代码行数:9,代码来源:setup.py

示例6: test

def test():
    import unittest
    import sys

    sys.path.insert(0, os.path.join(os.path.dirname(__file__)))
    import tests

    suite = tests.suite(options.args)
    unittest.TextTestRunner(verbosity=2).run(suite)
开发者ID:pombredanne,项目名称:winlibre_pm,代码行数:9,代码来源:pavement.py

示例7: run

 def run(self):
     import coverage
     import xmlrunner
     cov = coverage.coverage(source=["trytond.modules.avatax_calc"])
     cov.start()
     from tests import suite
     xmlrunner.XMLTestRunner(output="xml-test-results").run(suite())
     cov.stop()
     cov.save()
     cov.xml_report(outfile="coverage.xml")
开发者ID:aroraumang,项目名称:trytond-avalara,代码行数:10,代码来源:setup.py

示例8: run

    def run(self):
        if self.distribution.tests_require:
            self.distribution.fetch_build_eggs(self.distribution.tests_require)

        from tests import suite
        test_result = unittest.TextTestRunner(verbosity=2).run(suite())

        if test_result.wasSuccessful():
            sys.exit(0)
        sys.exit(-1)
开发者ID:rajatguptarg,项目名称:hubot-webhook,代码行数:10,代码来源:setup.py

示例9: run

    def run(self):
        os.environ['TRYTOND_DATABASE_URI'] = 'postgresql://'
        os.environ['DB_NAME'] = 'test_' + str(int(time.time()))

        from tests import suite
        test_result = unittest.TextTestRunner(verbosity=3).run(suite())

        if test_result.wasSuccessful():
            sys.exit(0)
        sys.exit(-1)
开发者ID:openlabs,项目名称:nereid-webshop-elastic-search,代码行数:10,代码来源:setup.py

示例10: run

    def run(self):
        from trytond.config import CONFIG
        CONFIG['db_type'] = 'sqlite'
        os.environ['DB_NAME'] = ':memory:'

        from tests import suite
        test_result = unittest.TextTestRunner(verbosity=3).run(suite())

        if test_result.wasSuccessful():
            sys.exit(0)
        sys.exit(-1)
开发者ID:aroraumang,项目名称:trytond-check-1,代码行数:11,代码来源:setup.py

示例11: run

    def run(self):
        os.environ["TRYTOND_DATABASE_URI"] = "sqlite://"
        os.environ["DB_NAME"] = ":memory:"

        from tests import suite

        test_result = unittest.TextTestRunner(verbosity=3).run(suite())

        if test_result.wasSuccessful():
            sys.exit(0)
        sys.exit(-1)
开发者ID:riteshshrv,项目名称:trytond-shipping-endicia,代码行数:11,代码来源:setup.py

示例12: run

    def run(self):
        if self.distribution.tests_require:
            self.distribution.fetch_build_eggs(self.distribution.tests_require)
        os.environ['TRYTOND_DATABASE_URI'] = "sqlite://"
        os.environ['DB_NAME'] = ':memory:'

        from tests import suite
        test_result = unittest.TextTestRunner(verbosity=3).run(suite())

        if test_result.wasSuccessful():
            sys.exit(0)
        sys.exit(-1)
开发者ID:fulfilio,项目名称:trytond-shipping-endicia,代码行数:12,代码来源:setup.py

示例13: run

    def run(self):
        if self.distribution.tests_require:
            self.distribution.fetch_build_eggs(self.distribution.tests_require)

        os.environ['TRYTOND_DATABASE_URI'] = 'postgresql://'
        os.environ['DB_NAME'] = 'test_' + str(int(time.time()))

        from tests import suite
        test_result = unittest.TextTestRunner(verbosity=3).run(suite())

        if test_result.wasSuccessful():
            sys.exit(0)
        sys.exit(-1)
开发者ID:tarunbhardwaj,项目名称:nereid-shipping,代码行数:13,代码来源:setup.py

示例14: run

    def run(self):
        os.environ['DB_NAME'] = 'test_' + str(int(time.time()))
        os.environ['TRYTOND_DATABASE_URI'] = "postgresql://"
        os.environ['TRYTOND_ASYNC__BROKER_URL'] = "redis://localhost:6379/0"
        os.environ['TRYTOND_ASYNC__BACKEND_URL'] = "redis://localhost:6379/1"

        from tests import suite

        test_result = unittest.TextTestRunner(verbosity=3).run(suite())

        if test_result.wasSuccessful():
            sys.exit(0)
        sys.exit(-1)
开发者ID:prakashpp,项目名称:trytond-async,代码行数:13,代码来源:setup.py

示例15: run

    def run(self):
        from trytond.config import config

        config.set("database", "uri", "postgresql://postgres:[email protected]:5432/")

        os.environ["DB_NAME"] = "test_" + str(int(time.time()))

        from tests import suite

        test_result = unittest.TextTestRunner(verbosity=3).run(suite())

        if test_result.wasSuccessful():
            sys.exit(0)
        sys.exit(-1)
开发者ID:usudaysingh,项目名称:trytond-customs-value,代码行数:14,代码来源:setup.py


注:本文中的tests.suite函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。