|
1 | 1 | import io, sys, os, pytest, re
|
2 | 2 | path = os.path.dirname(os.path.abspath(__file__))+'/app.py'
|
3 | 3 |
|
4 | | -@pytest.mark.it("Cool !!! 😎 You have the all data-type object") |
| 4 | +@pytest.mark.it("You have to print the value of the variable 'hello' in the console") |
5 | 5 | def test_all_data_type(capsys, app):
|
6 | 6 | app()
|
7 | 7 | captured = capsys.readouterr()
|
8 | 8 | assert "[[2, 1], {'name': 'juan'}]\n" in captured.out
|
9 | 9 |
|
10 | | -@pytest.mark.it("Use the for loop") |
| 10 | +@pytest.mark.it("You have to use a for loop") |
11 | 11 | def test_for_loop():
|
12 | 12 | with open(path, 'r') as content_file:
|
13 | 13 | content = content_file.read()
|
14 | 14 | regex = re.compile(r"for(\s)")
|
15 | 15 | assert bool(regex.search(content)) == True
|
16 | 16 |
|
17 | | -@pytest.mark.it("Use if statement") |
| 17 | +@pytest.mark.it("You have to use an if statement") |
18 | 18 | def test_if():
|
19 | 19 | with open(path, 'r') as content_file:
|
20 | 20 | content = content_file.read()
|
21 | 21 | regex = re.compile(r"if(\s)")
|
22 | 22 | assert bool(regex.search(content)) == True
|
23 | | - |
0 commit comments