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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)