Prompt Detail:
You need to write unit tests for a Python function 'max_number' that takes in a list of integers and returns the maximum number in the list. You'll be using the pytest testing framework and including typing in your tests. You'll need to use built-in Python types and the mypy typing tool when necessary.
The function should be tested with various inputs, for a wide range of possible use cases. The tests should ensure that the function returns the correct value in each case and that it handles errors gracefully.
Write tests first and then follow by function definition but only put "..." in body of the function, so code compiles but tests with fail.
Add a comment