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


Python TestSuite.layer方法代码示例

本文整理汇总了Python中unittest.TestSuite.layer方法的典型用法代码示例。如果您正苦于以下问题:Python TestSuite.layer方法的具体用法?Python TestSuite.layer怎么用?Python TestSuite.layer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在unittest.TestSuite的用法示例。


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

示例1: test_suite

# 需要导入模块: from unittest import TestSuite [as 别名]
# 或者: from unittest.TestSuite import layer [as 别名]
def test_suite():
    from unittest import TestSuite, makeSuite
    from Products.PloneTestCase.layer import ZCMLLayer
    suite = TestSuite()
    suite.layer = ZCMLLayer
    suite.addTest(makeSuite(TestCustomScript))
    return suite
开发者ID:sixfeetup,项目名称:Products.PloneFormGen,代码行数:9,代码来源:testSubmissionFolder.py

示例2: test_suite

# 需要导入模块: from unittest import TestSuite [as 别名]
# 或者: from unittest.TestSuite import layer [as 别名]
def test_suite():

    suite = TestSuite()
    suite.addTests(makeSuite(ATEventProviderTest))
    suite.addTests(makeSuite(TopicEventProviderTest))
    suite.layer = layer.ZCMLLayer

    return suite
开发者ID:collective,项目名称:p4a.plonecalendar,代码行数:10,代码来源:test_eventproviders.py

示例3: test_suite

# 需要导入模块: from unittest import TestSuite [as 别名]
# 或者: from unittest.TestSuite import layer [as 别名]
def test_suite():
    from unittest import TestSuite, makeSuite

    suite = TestSuite()
    suite.addTests(makeSuite(RecurrenceTest))
    suite.layer = layer.ZCMLLayer

    return suite
开发者ID:collective,项目名称:p4a.ploneevent,代码行数:10,代码来源:tests.py

示例4: test_suite

# 需要导入模块: from unittest import TestSuite [as 别名]
# 或者: from unittest.TestSuite import layer [as 别名]
def test_suite():
    suite = TestSuite()
    suite.layer = layer.ZCMLLayer
    suite.addTest(ZopeDocFileSuite(
        'migration.txt',
        package='p4a.ploneaudio.ataudio',
        test_class=testing.IntegrationTestCase,
        )
    )

    return suite
开发者ID:afrepues,项目名称:p4a.ploneaudio,代码行数:13,代码来源:ataudiotests.py

示例5: test_suite

# 需要导入模块: from unittest import TestSuite [as 别名]
# 或者: from unittest.TestSuite import layer [as 别名]
def test_suite():
    from unittest import TestSuite

    suite = TestSuite()

    if has_plone():
        import os
        from App import Common
        from Testing.ZopeTestCase.zopedoctest import ZopeDocFileSuite
        from p4a.audiopatch.tests.ploneintegration import testclass_builder
        from Products.PloneTestCase import layer

        pkg_home = Common.package_home({'__name__': 'p4a.audiopatch.tests'})
        samplesdir = os.path.join(pkg_home, 'samples')


	from p4a.audio.mp3.thirdparty import eyeD3
		
	samplefile = os.path.join(samplesdir, 'test-cyrrilic.mp3')
	mimetype = 'audio/mpeg'	
	encoding = 'WINDOWS-1251'
	
	t = eyeD3.Tag()
	t.link(samplefile)
	
	eyeD3_encoding = 'latin_1'

        fields = dict(
            title=t.getTitle().encode(eyeD3_encoding).decode(encoding),
            artist=t.getArtist().encode(eyeD3_encoding).decode(encoding),
            album=t.getAlbum().encode(eyeD3_encoding).decode(encoding),
            )

	suite.addTest(ZopeDocFileSuite('plone-audio-impl.txt', package='p4a.audiopatch',
		test_class=testclass_builder(samplefile=samplefile,
					required_mimetype=mimetype,
					file_content_type='File',
					fields=fields,
					tag_encoding=encoding,
					eyeD3_encoding=eyeD3_encoding)
	)
	)


        suite.layer = layer.ZCMLLayer

    return suite
开发者ID:kroman0,项目名称:products,代码行数:49,代码来源:test_docintegrationtests.py

示例6: test_suite

# 需要导入模块: from unittest import TestSuite [as 别名]
# 或者: from unittest.TestSuite import layer [as 别名]
def test_suite():
    suite = TestSuite()
    suite.addTest(makeSuite(testGetBookmarkletsSites))
    suite.layer = IPloneBookmarkletsLayer
    return suite
开发者ID:izak,项目名称:collective.plonebookmarklets,代码行数:7,代码来源:testGetBookmarkletsSites.py


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