11import io , sys , os , pytest , re
22path = os .path .dirname (os .path .abspath (__file__ ))+ '/app.py'
33
4- @pytest .mark .it ('The function maxInteger must exist' )
4+ @pytest .mark .it ('The function max_integer must exist' )
55def test_function_existence (capsys , app ):
6- assert app .maxInteger
6+ assert app .max_integer
77
8- @pytest .mark .it ("The function should return the maximun number from a list" )
8+ @pytest .mark .it ("The function should return the maximum number from a list" )
99def test_output (capsys , app ):
10- result = app .maxInteger ([43 ,23 ,6 ,87 ,43 ,1 ,4 ,6 ,3 ,67 ,8 ,3445 ,3 ,7 ,5435 ,63 ,346 ,3 ,456 ,734 ,6 ,34 ])
10+ result = app .max_integer ([43 ,23 ,6 ,87 ,43 ,1 ,4 ,6 ,3 ,67 ,8 ,3445 ,3 ,7 ,5435 ,63 ,346 ,3 ,456 ,734 ,6 ,34 ])
1111 assert result == 5435
1212
1313@pytest .mark .it ("The function should work with other lists" )
1414def test_output_2 (capsys , app ):
15- result = app .maxInteger ([43 ,23 ,6 ,8733 ,43 ,1 ,4 ,6 ,3 ,67 ,8 ,99999 ,3 ,7 ,5435 ,63 ])
15+ result = app .max_integer ([43 ,23 ,6 ,8733 ,43 ,1 ,4 ,6 ,3 ,67 ,8 ,99999 ,3 ,7 ,5435 ,63 ])
1616 assert result == 99999
1717
1818@pytest .mark .it ("Use the for loop" )
@@ -22,9 +22,9 @@ def test_for_loop():
2222 regex = re .compile (r"for(\s)*" )
2323 assert bool (regex .search (content )) == True
2424
25- @pytest .mark .it ("Use if statement" )
25+ @pytest .mark .it ("Use an if statement" )
2626def test_if ():
2727 with open (path , 'r' ) as content_file :
2828 content = content_file .read ()
2929 regex = re .compile (r"if(\s)*" )
30- assert bool (regex .search (content )) == True
30+ assert bool (regex .search (content )) == True
0 commit comments