HELP WANTED 👋 : If you'd like to take this challenge on, please let me know! Even if you're new to Python and/or github, this is a great place to start and I'd be happy to help walk you through this challenge as much as you need - don't hesitate to ask.
This particular issue will give you some exposure to using pytest to test functions (specifically to test error handling in a function).
We recently added the time_as_float function (#8) which is used like:
time_as_float("12:30") # 12.5
As you can see in the function's code, the function does a nice job of raising an error if it gets bad input (like "abc" or "a:b").
We should write tests to make sure that errors are raised when bad input is given. So, the goal of this issue is to write tests that:
Give bad input into the time_as_float function
Validate that the appropriate exception is raised (hint: pytest has a good way of doing this documented here)
If you are interested in working on this issue, but need some more guidance on where/how to start, please comment on this issue and I'll be happy to help!
HELP WANTED 👋 : If you'd like to take this challenge on, please let me know! Even if you're new to Python and/or github, this is a great place to start and I'd be happy to help walk you through this challenge as much as you need - don't hesitate to ask.
This particular issue will give you some exposure to using pytest to test functions (specifically to test error handling in a function).
We recently added the
time_as_float
function (#8) which is used like:As you can see in the function's code, the function does a nice job of raising an error if it gets bad input (like "abc" or "a:b").
We should write tests to make sure that errors are raised when bad input is given. So, the goal of this issue is to write tests that:
time_as_float
functionIf you are interested in working on this issue, but need some more guidance on where/how to start, please comment on this issue and I'll be happy to help!