Prompt Title: Pytest unit tests for a given function

Created 1 year ago
Votes 0
Views 294 times
0

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.
avatar
Przemek Wróbel
Shared 2 prompts
Created 1 year ago

Leave a Comment

Related Tag Prompts

94
0
392
11
151
0
Docker Pro
1 year ago 2023-01-29 06:08:59 AIPRM
308
0
MySQL Marvel
1 year ago 2023-02-13 00:05:32 AIPRM
260
0
Ansible Expert
1 year ago 2023-02-01 09:23:50 AIPRM
193
0
PostgreSQL Pro
1 year ago 2023-02-07 03:45:19 AIPRM
114
0
270
1
Dockerize me
1 year ago 2023-02-17 08:27:58 Chad Thompson-Smith
52
0
Windows Wizard
1 year ago 2023-01-21 13:43:15 AIPRM
163
0
Linux Legend
1 year ago 2023-01-22 12:08:21 AIPRM
325
0
MacOS Master
1 year ago 2023-01-22 10:29:36 AIPRM
271
0
Python Pro
1 year ago 2023-01-19 05:16:28 AIPRM