remove repl style comments and use indented blocks instead, #146

This commit is contained in:
David Halter
2013-03-01 19:52:36 +04:30
parent c98d099001
commit 90c800b257
2 changed files with 23 additions and 22 deletions

View File

@@ -23,12 +23,13 @@ def run_test(source, f_name, lines_to_execute):
which results are expected. The comment always begins with `#?`. The last which results are expected. The comment always begins with `#?`. The last
row symbolizes the cursor. row symbolizes the cursor.
For example: For example::
>>> #? ['ab']
>>> ab = 3; a
>>> #? int() #? ['ab']
>>> ab = 3; ab ab = 3; a
#? int()
ab = 3; ab
""" """
fails = 0 fails = 0
tests = 0 tests = 0

View File

@@ -70,10 +70,10 @@ def run_completion_test(script, correct, line_nr):
results are expected. The comment always begins with `#?`. The last row results are expected. The comment always begins with `#?`. The last row
symbolizes the cursor. symbolizes the cursor.
For example: For example::
>>> #? ['real'] #? ['real']
>>> a = 3; a.rea a = 3; a.rea
Because it follows ``a.rea`` and a is an ``int``, which has a ``real`` Because it follows ``a.rea`` and a is an ``int``, which has a ``real``
property. property.
@@ -94,10 +94,10 @@ def run_completion_test(script, correct, line_nr):
def run_definition_test(script, should_str, line_nr): def run_definition_test(script, should_str, line_nr):
""" """
Definition tests use the same symbols like completion tests. This is Definition tests use the same symbols like completion tests. This is
possible because the completion tests are defined with a list. possible because the completion tests are defined with a list::
>>> #? int() #? int()
>>> ab = 3; ab ab = 3; ab
Returns 1 for fail and 0 for success. Returns 1 for fail and 0 for success.
""" """
@@ -112,17 +112,17 @@ def run_definition_test(script, should_str, line_nr):
def run_goto_test(script, correct, line_nr): def run_goto_test(script, correct, line_nr):
""" """
Tests look like this: Tests look like this::
>>> abc = 1 abc = 1
>>> #! ['abc=1'] #! ['abc=1']
>>> abc abc
Additionally it is possible to add a number which describes to position of Additionally it is possible to add a number which describes to position of
the test (otherwise it's just end of line). the test (otherwise it's just end of line)::
>>> #! 2 ['abc=1'] #! 2 ['abc=1']
>>> abc abc
Returns 1 for fail and 0 for success. Returns 1 for fail and 0 for success.
""" """
@@ -137,11 +137,11 @@ def run_goto_test(script, correct, line_nr):
def run_related_name_test(script, correct, line_nr): def run_related_name_test(script, correct, line_nr):
""" """
Tests look like this: Tests look like this::
>>> abc = 1 abc = 1
>>> #< abc@1,0 abc@3,0 #< abc@1,0 abc@3,0
>>> abc abc
Returns 1 for fail and 0 for success. Returns 1 for fail and 0 for success.
""" """