|
1 | 1 | import pytest,os,re,io,sys, mock, json |
2 | 2 |
|
3 | | -@pytest.mark.it('The function generate_dict should exist') |
| 3 | +@pytest.mark.it('The function squares_dictionary should exist') |
4 | 4 | def test_function_existence(capsys, app): |
5 | | - assert app.generate_dict |
| 5 | + assert app.squares_dictionary |
6 | 6 |
|
7 | 7 | @pytest.mark.it('The function should return a dictionary') |
8 | 8 | def test_typeof_return(capsys, app): |
9 | | - assert type(app.generate_dict(7)) == type({}) |
| 9 | + assert type(app.squares_dictionary(7)) == type({}) |
10 | 10 |
|
11 | | -@pytest.mark.it('The function should return the expected output') |
| 11 | +@pytest.mark.it('The function should return the expected output. Testing with 8') |
12 | 12 | def test_expected_output(capsys, app): |
13 | | - assert app.generate_dict(8) == {1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64} |
| 13 | + assert app.squares_dictionary(8) == {1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64} |
14 | 14 |
|
15 | | -@pytest.mark.it('The function should work with other entries') |
| 15 | +@pytest.mark.it('The function should return the expected output. Testing with 5') |
16 | 16 | def test_another_entry_5(capsys, app): |
17 | | - assert app.generate_dict(5) == {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} |
18 | | - |
| 17 | + assert app.squares_dictionary(5) == {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} |
19 | 18 |
|
0 commit comments