Example #1
0
def test_intention_function_returns(line):
    intention = Intention(line)
    assert intention.function_returns() is True
Example #2
0
def test_intentions_function_returns_not(line):
    intention = Intention(line)
    assert intention.function_returns() is None
Example #3
0
def test_intentions_function_argument_not(line):
    intention = Intention(line)
    assert intention.function_argument() is None
Example #4
0
def test_intention_init():
    intention = Intention('line')
    assert intention.line == 'line'
Example #5
0
def test_intention_is_function(line):
    intention = Intention(line)
    assert intention.is_function() is True
Example #6
0
def test_intentions_is_function_not(line):
    """
    Ensures these patterns are not recognized as function start.
    """
    intention = Intention(line)
    assert intention.is_function() is None
Example #7
0
def test_intention_assignment(line):
    intention = Intention(line)
    assert intention.assignment() is True
Example #8
0
def test_intention_unnecessary_colon():
    intention = Intention('line:')
    assert intention.unnecessary_colon() is True
Example #9
0
def test_intention_imports(line):
    intention = Intention(line)
    assert intention.imports() is True
Example #10
0
def test_intention_imports_not():
    intention = Intention('import')
    assert intention.imports() is None
Example #11
0
def test_intention_while_not(line):
    intention = Intention(line)
    assert intention.while_() is None
Example #12
0
def test_intention_while(line):
    intention = Intention(line)
    assert intention.while_() is True
Example #13
0
def test_intention_unnecessary_colon_not():
    assert Intention('line').unnecessary_colon() is None
Example #14
0
def test_intention_foreach_as(line):
    intention = Intention(line)
    assert intention.foreach_as() is True
Example #15
0
def test_intention_assignment_not():
    intention = Intention('function x')
    assert intention.assignment() is None
Example #16
0
def test_intention_foreach_as_not(line):
    intention = Intention(line)
    assert intention.foreach_as() is None
Example #17
0
def test_intention_init():
    intention = Intention("line")
    assert intention.line == "line"