本文整理汇总了Python中blowdrycss.breakpointparser.BreakpointParser.limit_key方法的典型用法代码示例。如果您正苦于以下问题:Python BreakpointParser.limit_key方法的具体用法?Python BreakpointParser.limit_key怎么用?Python BreakpointParser.limit_key使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类blowdrycss.breakpointparser.BreakpointParser
的用法示例。
在下文中一共展示了BreakpointParser.limit_key方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_build_media_query_invalid_limit_key
# 需要导入模块: from blowdrycss.breakpointparser import BreakpointParser [as 别名]
# 或者: from blowdrycss.breakpointparser.BreakpointParser import limit_key [as 别名]
def test_build_media_query_invalid_limit_key(self):
css_class = 'padding-100-small-up'
name = 'padding'
value = px_to_em('100')
expected = ''
css_property = Property(name=name, value=value, priority='')
breakpoint_parser = BreakpointParser(css_class=css_class, css_property=css_property)
breakpoint_parser.limit_key = 'invalid_key'
css = breakpoint_parser.build_media_query()
self.assertEqual(css, expected)
示例2: test_css_for_up_wrong_limit_key
# 需要导入模块: from blowdrycss.breakpointparser import BreakpointParser [as 别名]
# 或者: from blowdrycss.breakpointparser.BreakpointParser import limit_key [as 别名]
def test_css_for_up_wrong_limit_key(self):
css_class = 'padding-100-small-up'
name = 'padding'
value = px_to_em('100')
expected = ''
css_property = Property(name=name, value=value, priority='')
breakpoint_parser = BreakpointParser(css_class=css_class, css_property=css_property)
breakpoint_parser.limit_key = '-only' # Change to WRONG LIMIT KEY
css = breakpoint_parser.css_for_up()
self.assertEqual(css, expected)