本文整理匯總了Python中gluon.html.COL屬性的典型用法代碼示例。如果您正苦於以下問題:Python html.COL屬性的具體用法?Python html.COL怎麽用?Python html.COL使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類gluon.html
的用法示例。
在下文中一共展示了html.COL屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_COL
# 需要導入模塊: from gluon import html [as 別名]
# 或者: from gluon.html import COL [as 別名]
def test_COL(self):
# Empty COL test
self.assertEqual(COL().xml(), b'<col />')
# Not Empty COL test
self.assertEqual(COL(_span='2').xml(), b'<col span="2" />')
# Commented for now not so sure how to make it pass properly was passing locally
# I think this test is interesting and add value
# This fail relate to python 2.6 limitation I think
# Failing COL test
# with self.assertRaises(SyntaxError) as cm:
# COL('<>').xml()
# self.assertEqual(cm.exception[0], '<col/> tags cannot have components')
# For now
self.assertRaises(SyntaxError, COL, b'<>')