Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add case insensitivity #284

Open
wants to merge 1 commit into
base: 2022/python
Choose a base branch
from
Open
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
7 changes: 7 additions & 0 deletions coke/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def test_25():
"""coke accepts 25 cents"""
input = "25"
output = "Amount Due: 25\n"
output = output.lower()
check50.run("python3 coke.py").stdin(input, prompt=True).stdout(output, regex=True).kill()


Expand All @@ -21,6 +22,7 @@ def test_10():
"""coke accepts 10 cents"""
input = "10"
output = "Amount Due: 40\n"
output = output.lower()
check50.run("python3 coke.py").stdin(input, prompt=True).stdout(output, regex=True).kill()


Expand All @@ -29,6 +31,7 @@ def test_1():
"""coke accepts 5 cents"""
input = "5"
output = "Amount Due: 45\n"
output = output.lower()
check50.run("python3 coke.py").stdin(input, prompt=True).stdout(output, regex=True).kill()


Expand All @@ -37,6 +40,7 @@ def test_invalid():
"""coke rejects invalid amount of cents"""
input = "30"
output = "Amount Due: 50\n"
output = output.lower()
check50.run("python3 coke.py").stdin(input, prompt=True).stdout(output, regex=True).kill()


Expand All @@ -45,6 +49,7 @@ def test_multiple():
"""coke accepts continued input"""
input = "10"
output = "Amount Due: 30\n"
output = output.lower()
check50.run("python3 coke.py").stdin(input, prompt=True).stdin(input, prompt=True).stdout(output, regex=True).kill()


Expand All @@ -53,6 +58,7 @@ def test_terminate():
"""coke terminates at 50 cents"""
input = "10"
output = "Change Owed: 0\n"
output = output.lower()
check50.run("python3 coke.py").stdin(input, prompt=True).stdin(input, prompt=True).stdin(input, prompt=True).stdin(input, prompt=True).stdin(input, prompt=True).stdout(output, regex=True).exit()


Expand All @@ -61,4 +67,5 @@ def test_change():
"""coke provides correct change"""
input = "25"
output = "Change Owed: 10\n"
output = output.lower()
check50.run("python3 coke.py").stdin(input, prompt=True).stdin("10", prompt=True).stdin(input, prompt=True).stdout(output, regex=True).exit()