本文整理汇总了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
示例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
示例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
示例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
示例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
示例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