Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@ Give an integer:
*11*
Give a float:
*4.2*
Give a boolean:
*True*
You gave the string bye-bye
You gave the integer 11
You gave the float 4.2
You gave the boolean True
```

```plaintext
Expand All @@ -26,10 +23,7 @@ Give an integer:
*-4*
Give a float:
*3200.1*
Give a boolean:
*False*
You gave the string Oops!
You gave the integer -4
You gave the float 3200.1
You gave the boolean False
```
11 changes: 5 additions & 6 deletions tests/test_exercise.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import src.exercise

def test_exercise():
input_values = ["bye","114","4.6","False"]
input_values_stored = ["bye","114","4.6","False"]
input_values = ["bye","114","4.6"]
input_values_stored = ["bye","114","4.6"]
output = []

def mock_input(s=None):
Expand All @@ -19,8 +19,7 @@ def mock_input(s=None):

src.exercise.main()

assert [output[0],output[1],output[2],output[3]] == ["Give a string:","Give an integer:","Give a float:","Give a boolean:"]
assert [output[4],output[5],output[6],output[7]] == ["You gave the string " + input_values_stored[0],\
assert [output[0],output[1],output[2]]] == ["Give a string:","Give an integer:","Give a float:"]
assert [output[3],output[4],output[5]] == ["You gave the string " + input_values_stored[0],\
"You gave the integer " + input_values_stored[1],\
"You gave the float " + input_values_stored[2],\
"You gave the boolean " + input_values_stored[3]]
"You gave the float " + input_values_stored[2]]