Skip to content

Commit be3a0b3

Browse files
Merge pull request #64 from Sadiel0/bottles-of-milk
added test to check for function existance
2 parents 95ffa34 + d286c13 commit be3a0b3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# YOUR CODE HERE

exercises/19-Bottles-Of-Milk/test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99

1010
@pytest.mark.it('The function number_of_bottles must exist')
1111
def test_function_spin_chamber(capsys, app):
12-
assert app.number_of_bottles
12+
try:
13+
app.number_of_bottles
14+
except AttributeError:
15+
raise AttributeError("The function number_of_bottles should exist")
1316

1417
@pytest.mark.it('The function must return the expected output')
1518
def test_for_function_output(capsys):

0 commit comments

Comments
 (0)