## Overview
You are an expert software engineer code assistant tasked with generating additional unit tests for a Python source file and its corresponding test file.
{% if add_patch_content %}
Your objective is to add {{count}} regression tests that detect the bug which is resolved by the provided patch.
{% else %}
Your objective is to enhance both line coverage and branch coverage by adding new unit tests to the existing test suite.
{% endif %}

### Guidelines:
{% if add_patch_content %}
1. Analyze the Code: Examine the provided source code to understand its functionality, inputs, outputs, and core logic.
2. Analyze the Patch: Examine the provided patch to understand the bug it fixes in the source code.
3. Identify Test Cases: Develop a detailed list of test cases that will fully validate the provided patch.
4. Add and Review Tests: Integrate individual tests ensuring they collectively cover all possible scenarios, including edge cases and exception handling.
5. Maintain Consistency: Ensure new tests are consistent with the existing test suite in terms of style, naming conventions, and structure. Assume new tests are part of the same suite if a test suite exists.
6. Analyze the Code: Examine the provided source code to understand its functionality, inputs, outputs, and core logic.
7. Identify Test Cases: Develop a detailed list of test cases that will fully validate the source code and achieve 100% line coverage and branch coverage.
8. Add and Review Tests: Integrate individual tests ensuring they collectively cover all possible scenarios, including edge cases and exception handling.
9. Maintain Consistency: Ensure new tests are consistent with the existing test suite in terms of style, naming conventions, and structure. Assume new tests are part of the same suite if a test suite exists.
{% endif %}

### Additional constraints:
- Return only valid Python in the YAML fields; do not produce syntax errors.
- Octal literals must use digits 0-7 only (e.g., 0o644). Do not generate invalid octal values like 0o800.

## Source File
Here is the source file `{{source_file}}` that you will be writing tests against.
We have manually added line numbers to assist in understanding the code coverage.
These line numbers are not part of the original code.

-----------------------------------------------------------
{{source_numbered}}
-----------------------------------------------------------

{% if problem_statement %}
## Problem Statement (Human-Readable Issue)

The following is the human-written issue description for context. Use it to craft tests that reflect the intended behavior and catch the underlying bug.

-----------------------------------------------------------
{{ problem_statement }}
-----------------------------------------------------------
{% endif %}

{% if add_patch_content %}
## Patch

Here is the patch which is applied to the source file `{{source_file}}` to fix a
bug.

-----------------------------------------------------------
{{patch_content}}
-----------------------------------------------------------
{% endif %}


## Test File
Here is the file `{{test_file}}` that contains the existing tests.
-----------------------------------------------------------
{{test_content}}
-----------------------------------------------------------

{% if add_failed_tests_section %}
## Failed tests

The following tests previously generated by you are inaccurate.  Do not generate the same tests again.
-----------------------------------------------------------
{{ failed_tests_section }}
-----------------------------------------------------------
{% endif %}

Example output:
```yaml
language: Python
number_of_tests: ...
test_behavior: ...
test_code: ...
new_imports_code: ..
```

The response should be only a valid YAML object, without any introduction text or follow-up text.

Answer:
```yaml
"""

