python类DocFileSuite()的实例源码

__init__.py 文件源码 项目:Flask-NvRay-Blog 作者: rui7157 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def additional_tests():
    import doctest, unittest
    suite = unittest.TestSuite((
        doctest.DocFileSuite(
            os.path.join('tests', 'api_tests.txt'),
            optionflags=doctest.ELLIPSIS, package='pkg_resources',
            ),
        ))
    if sys.platform == 'win32':
        suite.addTest(doctest.DocFileSuite('win_script_wrapper.txt'))
    return suite
__init__.py 文件源码 项目:NeuroMobile 作者: AndrewADykman 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def additional_tests():
    import doctest, unittest
    suite = unittest.TestSuite((
        doctest.DocFileSuite(
            os.path.join('tests', 'api_tests.txt'),
            optionflags=doctest.ELLIPSIS, package='pkg_resources',
            ),
        ))
    if sys.platform == 'win32':
        suite.addTest(doctest.DocFileSuite('win_script_wrapper.txt'))
    return suite
test_datetime.py 文件源码 项目:isf 作者: w3h 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def test_suite():
    import doctest
    return unittest.TestSuite([
        unittest.makeSuite(DateTimeTests),
        doctest.DocFileSuite('DateTime.txt', package='DateTime'),
        doctest.DocFileSuite('pytz.txt', package='DateTime'),
    ])
__init__.py 文件源码 项目:OneClickDTU 作者: satwikkansal 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def additional_tests(suite=None):
    import simplejson
    import simplejson.encoder
    import simplejson.decoder
    if suite is None:
        suite = unittest.TestSuite()
    for mod in (simplejson, simplejson.encoder, simplejson.decoder):
        suite.addTest(doctest.DocTestSuite(mod))
    suite.addTest(doctest.DocFileSuite('../../index.rst'))
    return suite
test_sale_price_list.py 文件源码 项目:gnuhealth-live 作者: kret0s 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def suite():
    suite = trytond.tests.test_tryton.suite()
    suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
        SalePriceListTestCase))
    suite.addTests(doctest.DocFileSuite('scenario_sale_price_list.rst',
            setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
    return suite
test_sale_supply.py 文件源码 项目:gnuhealth-live 作者: kret0s 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def suite():
    suite = trytond.tests.test_tryton.suite()
    suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
            SaleSupplyTestCase))
    suite.addTests(doctest.DocFileSuite('scenario_sale_supply.rst',
        setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
    return suite
test_account_statement.py 文件源码 项目:gnuhealth-live 作者: kret0s 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def suite():
    suite = trytond.tests.test_tryton.suite()
    suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
        AccountStatementTestCase))
    suite.addTests(doctest.DocFileSuite('scenario_account_statement.rst',
        setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
    return suite
test_sale_stock_quantity.py 文件源码 项目:gnuhealth-live 作者: kret0s 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def suite():
    suite = trytond.tests.test_tryton.suite()
    suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
        SaleStockQuantityTestCase))
    suite.addTests(doctest.DocFileSuite('scenario_sale_stock_quantity.rst',
            setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
    return suite
test_sale_supply_drop_shipment.py 文件源码 项目:gnuhealth-live 作者: kret0s 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def suite():
    suite = trytond.tests.test_tryton.suite()
    suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
            SaleSupplyDropShipmentTestCase))
    suite.addTests(doctest.DocFileSuite(
            'scenario_sale_supply_drop_shipment.rst',
            setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
    return suite
test_account_payment.py 文件源码 项目:gnuhealth-live 作者: kret0s 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def suite():
    suite = trytond.tests.test_tryton.suite()
    suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
            AccountPaymentTestCase))
    suite.addTests(doctest.DocFileSuite('scenario_account_payment.rst',
            setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
    return suite
test_account_invoice.py 文件源码 项目:gnuhealth-live 作者: kret0s 项目源码 文件源码 阅读 44 收藏 0 点赞 0 评论 0
def suite():
    suite = trytond.tests.test_tryton.suite()
    suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
        AccountInvoiceTestCase))
    suite.addTests(doctest.DocFileSuite('scenario_invoice.rst',
            setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
    suite.addTests(doctest.DocFileSuite('scenario_invoice_supplier.rst',
            setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
    suite.addTests(doctest.DocFileSuite(
            'scenario_invoice_alternate_currency.rst',
            setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
    return suite
test_sale_opportunity.py 文件源码 项目:gnuhealth-live 作者: kret0s 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def suite():
    suite = trytond.tests.test_tryton.suite()
    suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
        SaleOpportunityTestCase))
    suite.addTests(doctest.DocFileSuite('scenario_sale_opportunity.rst',
            setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
    return suite
test_sale.py 文件源码 项目:gnuhealth-live 作者: kret0s 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def suite():
    suite = trytond.tests.test_tryton.suite()
    suite.addTests(unittest.TestLoader().loadTestsFromTestCase(SaleTestCase))
    suite.addTests(doctest.DocFileSuite('scenario_sale.rst',
            setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
    return suite
test_stock_package.py 文件源码 项目:gnuhealth-live 作者: kret0s 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def suite():
    suite = trytond.tests.test_tryton.suite()
    suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
            StockPackageTestCase))
    suite.addTests(doctest.DocFileSuite('scenario_stock_package.rst',
            setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
    return suite
test_sale_promotion.py 文件源码 项目:gnuhealth-live 作者: kret0s 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def suite():
    suite = trytond.tests.test_tryton.suite()
    suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
            SalePromotionTestCase))
    suite.addTests(doctest.DocFileSuite('scenario_sale_promotion.rst',
        setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
    return suite
test_stock_lot.py 文件源码 项目:gnuhealth-live 作者: kret0s 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def suite():
    suite = trytond.tests.test_tryton.suite()
    from trytond.modules.company.tests import test_company
    for test in test_company.suite():
        if test not in suite and not isinstance(test, doctest.DocTestCase):
            suite.addTest(test)
    suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
            StockLotTestCase))
    suite.addTests(doctest.DocFileSuite('scenario_stock_lot_shipment_out.rst',
        setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
    return suite
all.py 文件源码 项目:PyDataLondon29-EmbarrassinglyParallelDAWithAWSLambda 作者: SignalMedia 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def additional_tests():
    #print "here-000000000000000"
    #print "-----", glob(os.path.join(os.path.dirname(__file__), '*.doctest'))
    dir = os.path.dirname(__file__)
    paths = glob(os.path.join(dir, '*.doctest'))
    files = [ os.path.basename(path) for path in paths ]
    return unittest.TestSuite(
        [ doctest.DocFileSuite(file) for file in files ]
        )
#if os.path.split(path)[-1] != 'index.rst'
# skips time-dependent doctest in index.rst
test_readme.py 文件源码 项目:adrian.cgen 作者: adrian-lang 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def load_tests(loader, tests, pattern):
    suite = doctest.DocFileSuite("../README.rst")
    tests.addTests(suite)
    return tests
simplegeneric.py 文件源码 项目:Repobot 作者: Desgard 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def test_suite():
    import doctest
    return doctest.DocFileSuite(
        'README.txt',
        optionflags=doctest.ELLIPSIS|doctest.REPORT_ONLY_FIRST_FAILURE,
    )
all.py 文件源码 项目:neighborhood_mood_aws 作者: jarrellmark 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def additional_tests():
    #print "here-000000000000000"
    #print "-----", glob(os.path.join(os.path.dirname(__file__), '*.doctest'))
    dir = os.path.dirname(__file__)
    paths = glob(os.path.join(dir, '*.doctest'))
    files = [ os.path.basename(path) for path in paths ]
    return unittest.TestSuite(
        [ doctest.DocFileSuite(file) for file in files ]
        )
#if os.path.split(path)[-1] != 'index.rst'
# skips time-dependent doctest in index.rst


问题


面经


文章

微信
公众号

扫码关注公众号