本文整理汇总了Python中mpx_test.main函数的典型用法代码示例。如果您正苦于以下问题:Python main函数的具体用法?Python main怎么用?Python main使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了main函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_partial_output
self.formatter.add_text('title text')
self.formatter.close_tag()
self.formatter.open_tag('body')
self.formatter.add_text('body text')
self.formatter.single_tag('br')
self.formatter.open_close_tag('img', src='image_source', x='image_x', y='image_y')
self.formatter.close_tag('body')
output = self.formatter.output_complete()
self.failUnless(output == _html,
'output = %r\n\nhtml = %r' % (output, _html))
def test_partial_output(self):
self.formatter.open_tag('html')
self.formatter.open_tag('title')
self.formatter.add_text('title text')
self.formatter.close_tag()
output = self.formatter.output()
self.failUnless(output == _html[0:35], 'output = %r\n\nhtml = %r' % (output, _html[0:35]))
self.formatter.open_tag('body')
output = self.formatter.output()
self.failUnless(output == _html[35:43], 'output = %r\n\nhtml = %r' % (output, _html[35:43]))
self.formatter.add_text('body text')
self.formatter.single_tag('br')
self.formatter.open_close_tag('img', src='image_source', x='image_x', y='image_y')
self.formatter.close_tag('body')
self.formatter.close_tag()
output = self.formatter.output()
self.failUnless(output == _html[43:], 'output = %r\n\nhtml = %r' % (output, _html[43:]))
if __name__ == '__main__':
main()
示例2: test_set_property_2
v = props.get('Attribute')
assert v == 'Value', 'Attribute not created'
return
def test_set_property_2(self):
props = Properties(self.file_object)
props.set('NewAttribute', 'Value')
v = props.NewAttribute
assert v == 'Value', 'Attribute not created'
return
def test_default_properites(self):
props = Properties(self.file_object)
v = props.get('ROOT')
assert v != None, 'ROOT is undefined'
return
def test_default_properites_2(self):
props = Properties(self.file_object)
v = props.ROOT
assert v != None, 'ROOT is undefined'
return
def test_str(self):
v = str(Properties(self.file_object))
assert v != None, 'Error while dumping properites'
return
def test_repr(self):
v = repr(Properties(self.file_object))
assert v != None, 'Error while dumping properites'
return
if __name__ == '__main__':
main(TestCase)