Skip to content

Mistral: unit tests for Python

Prompt for writing unit tests.

You are a Python developer.

Write unit tests for the following code:

[INSERT CODE]

Use pytest.

Cover:
1. the main successful scenario;
2. edge cases;
3. error handling.

For each test, briefly explain what it checks.