def test_creates_element_node_with_hash(self):
     node = nodes.create_node('#idName')
     assert isinstance(node, nodes.ElementNode)
     
     node = nodes.create_node('   #idName')
     assert isinstance(node, nodes.ElementNode)
    def test_creates_html_comment_node_with_front_slash(self):
        node = nodes.create_node('/ some Comment')
        assert isinstance(node, nodes.CommentNode)

        node = nodes.create_node('     / some Comment')
        assert isinstance(node, nodes.CommentNode)
示例#3
0
    def test_backslash_symbol_creates_tag_node(self):
        node = nodes.create_node('\\= some.variable')
        assert isinstance(node, nodes.HamlNode)

        node = nodes.create_node('    \\= some.variable')
        assert isinstance(node, nodes.HamlNode)
 def test_creates_element_node_with_dot(self):
     node = nodes.create_node('.className')
     assert isinstance(node, nodes.ElementNode)
     
     node = nodes.create_node('   .className')
     assert isinstance(node, nodes.ElementNode)
 def test_dash_symbol_creates_tag_node(self):
     node = nodes.create_node('- for something in somethings')
     assert isinstance(node, nodes.TagNode)
 def test_python_creates_python_node(self):
     node = nodes.create_node(':python')
     assert isinstance(node, nodes.PythonFilterNode)
示例#7
0
 def test_random_text_returns_haml_node(self):
     node = nodes.create_node('just some random text')
     assert isinstance(node, nodes.HamlNode)
     
     node = nodes.create_node('   more random text')
     assert isinstance(node, nodes.HamlNode)
 def test_creates_element_node_with_percent(self):
     node = nodes.create_node('%div')
     assert isinstance(node, nodes.ElementNode)
     
     node = nodes.create_node('   %html')
     assert isinstance(node, nodes.ElementNode)
示例#9
0
 def test_creates_element_node_with_hash(self):
     node = nodes.create_node('#idName')
     assert isinstance(node, nodes.ElementNode)
     
     node = nodes.create_node('   #idName')
     assert isinstance(node, nodes.ElementNode)
示例#10
0
    def test_creates_html_comment_node_with_front_slash(self):
        node = nodes.create_node('/ some Comment')
        assert isinstance(node, nodes.CommentNode)

        node = nodes.create_node('     / some Comment')
        assert isinstance(node, nodes.CommentNode)
示例#11
0
 def test_creates_element_node_with_dot(self):
     node = nodes.create_node('.className')
     assert isinstance(node, nodes.ElementNode)
     
     node = nodes.create_node('   .className')
     assert isinstance(node, nodes.ElementNode)
示例#12
0
 def test_slash_with_if_creates_a_conditional_comment_node(self):
     node = nodes.create_node('/[if IE 5]')
     assert isinstance(node, nodes.ConditionalCommentNode)
示例#13
0
 def test_python_creates_python_node(self):
     node = nodes.create_node(':python')
     assert isinstance(node, nodes.PythonFilterNode)
 def test_random_text_returns_haml_node(self):
     node = nodes.create_node('just some random text')
     assert isinstance(node, nodes.HamlNode)
     
     node = nodes.create_node('   more random text')
     assert isinstance(node, nodes.HamlNode)
示例#15
0
 def test_correct_symbol_creates_haml_comment(self):
     node = nodes.create_node('-# This is a haml comment')
     assert isinstance(node, nodes.HamlCommentNode)
 def test_correct_symbol_creates_haml_comment(self):
     node = nodes.create_node('-# This is a haml comment')
     assert isinstance(node, nodes.HamlCommentNode)
示例#17
0
 def test_creates_element_node_with_percent(self):
     node = nodes.create_node('%div')
     assert isinstance(node, nodes.ElementNode)
     
     node = nodes.create_node('   %html')
     assert isinstance(node, nodes.ElementNode)
 def test_equals_symbol_creates_variable_node(self):
     node = nodes.create_node('= some.variable')
     assert isinstance(node, nodes.VariableNode)
示例#19
0
 def test_equals_symbol_creates_variable_node(self):
     node = nodes.create_node('= some.variable')
     assert isinstance(node, nodes.VariableNode)
 def test_backslash_symbol_creates_tag_node(self):
     node = nodes.create_node('\\= some.variable')
     assert isinstance(node, nodes.HamlNode)
     
     node = nodes.create_node('    \\= some.variable')
     assert isinstance(node, nodes.HamlNode)
示例#21
0
 def test_dash_symbol_creates_tag_node(self):
     node = nodes.create_node('- for something in somethings')
     assert isinstance(node, nodes.TagNode)
 def test_slash_with_if_creates_a_conditional_comment_node(self):
     node = nodes.create_node('/[if IE 5]')
     assert isinstance(node, nodes.ConditionalCommentNode)
示例#23
0
 def test_dash_symbol_creates_tag_node_web2py(self):
     node = nodes.create_node("- for something in somethings:", "web2py")
     assert isinstance(node, nodes.TagNode)