Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0149681

Browse files
Changed the description of some tests
1 parent 5a2a0a4 commit 0149681

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎exercises/04.1-count_on/test.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ def test_variable_exists():
99
def test_variable_value():
1010
assert app.new_list == [[2, 1], {'name': 'juan'}]
1111

12-
1312
@pytest.mark.it("You have to use a for loop")
1413
def test_for_loop():
1514
with open(path, 'r') as content_file:
@@ -24,15 +23,16 @@ def test_if():
2423
regex = re.compile(r"if(\s)")
2524
assert bool(regex.search(content)) == True
2625

27-
# @pytest.mark.it("You have to print the value of the variable 'hello' in the console")
28-
# def test_all_data_type(capsys, app):
29-
# app()
30-
# captured = capsys.readouterr()
31-
# assert "[[2, 1], {'name': 'juan'}]\n" in captured.out
32-
33-
@pytest.mark.it("Print the value of the variable 'new_list'")
34-
def test_if():
26+
@pytest.mark.it("you should use print()")
27+
def test_print():
3528
with open(path, 'r') as content_file:
3629
content = content_file.read()
3730
regex = re.compile(r"print\(new_list\)")
38-
assert bool(regex.search(content)) == True
31+
assert bool(regex.search(content)) == True
32+
33+
@pytest.mark.it("You have to print the value of the variable 'new_list' in the console")
34+
def test_all_data_type(capsys, app):
35+
app()
36+
captured = capsys.readouterr()
37+
38+
assert "[[2, 1], {'name': 'juan'}]\n" in captured.out

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /