Skip to content

Commit ea41fd8

Browse files
Add files via upload
1 parent 2f08559 commit ea41fd8

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

test_session8.py

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,14 @@ def test_readme_words_counts():
3232
assert len(readme_words) >= 100 , "Kindly define README properly"
3333

3434

35-
#4 Readme Proper Description
36-
def test_readme_proper_desscription():
37-
READMELOOKSGOOD = True
38-
readme = open('README.md','r')
39-
readme_words = readme.read().split()
40-
readme.close()
41-
for words in README_CONTENT_CHECK_FOR:
42-
if words not in readme_words:
43-
READMELOOKSGOOD = False
44-
pass
45-
assert READMELOOKSGOOD == True , "You have not defined all functions/classes in README.md"
46-
47-
48-
#5 function name had caps letter
35+
#4 function name had caps letter
4936
def test_funcation_had_cap_letter():
5037
functions = inspect.getmembers(session8, inspect.isfunction )
5138
for function in functions:
5239
assert len(re.findall('([A-Z])', function[0])) == 0, "You have used Capital letter(s) in your function names"
5340

5441

55-
#6 PEP8 Guidelines
42+
#5 PEP8 Guidelines
5643
def test_fourspace():
5744
lines = inspect.getsource(session8)
5845
spaces = re.findall('\n +.', lines)
@@ -61,13 +48,13 @@ def test_fourspace():
6148
assert len(re.sub(r'[a-zA-Z#@\n\"\']', '', space)) % 4 == 0,"Your code intentation does not follow PEP8 guidelines"
6249

6350

64-
#7 check docstring exist
51+
#6 check docstring exist
6552
def test_docstring_length():
6653
a = session8.check_fn_docs()
6754
assert a(session8.mul) == True
6855

6956

70-
#8 check next fibonacci number
57+
#7 check next fibonacci number
7158
def test_fibonacci():
7259
k = session8.next_fibo_number()
7360
k()
@@ -76,7 +63,7 @@ def test_fibonacci():
7663
assert k() == 2
7764

7865

79-
#9
66+
#8
8067
def test_function_single_dict_call():
8168
c = session8.function_counter( session8.add )
8269
c()
@@ -91,7 +78,7 @@ def test_function_single_dict_call():
9178

9279

9380

94-
#10
81+
#9
9582
def test_function_calling_sep_dict():
9683
c = session8.function_two_dict(session8.add, session8.userA)
9784
c()

0 commit comments

Comments
 (0)