mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
make comments easier to comprehend (#3517)
Make comments in the test_multiline_...-testcases easier to comprehend by using correct grammar and spelling and by stating more relevant aspects. Comment on test parameters with inline instead of block comments, as this makes it easier to associate code lines with comments, without having to resort to additional blank lines for separation.
This commit is contained in:
parent
da7bd1105b
commit
3a232c6782
1 changed files with 6 additions and 8 deletions
|
@ -40,16 +40,14 @@ def test_gather_load_store_names_tuple():
|
|||
@pytest.mark.parametrize(
|
||||
"line1",
|
||||
[
|
||||
# this second line wil be transformed into a subprocess call
|
||||
"x = 1",
|
||||
# this second line wil be transformed into a subprocess call even though
|
||||
# ls is defined.
|
||||
"ls = 1",
|
||||
# the second line wil be transformed still even though l exists.
|
||||
"l = 1",
|
||||
"x = 1", # Both, ls and l remain undefined.
|
||||
"ls = 1", # l remains undefined.
|
||||
"l = 1", # ls remains undefined.
|
||||
],
|
||||
)
|
||||
def test_multilline_num(xonsh_execer, line1):
|
||||
# Subprocess transformation happens on the second line,
|
||||
# because not all variables are known.
|
||||
code = line1 + "\nls -l\n"
|
||||
tree = check_parse(code)
|
||||
lsnode = tree.body[1]
|
||||
|
@ -58,7 +56,7 @@ def test_multilline_num(xonsh_execer, line1):
|
|||
|
||||
|
||||
def test_multilline_no_transform():
|
||||
# no subprocess transformations happen here since all variables are known
|
||||
# No subprocess transformations happen here, since all variables are known.
|
||||
code = "ls = 1\nl = 1\nls -l\n"
|
||||
tree = check_parse(code)
|
||||
lsnode = tree.body[2]
|
||||
|
|
Loading…
Add table
Reference in a new issue