Skip to content

Test: test_profile_parsing_file_mozart_async_basic flakes on partial phone output #35

@rajjaa-hr

Description

@rajjaa-hr

Summary

`test_profile_parsing_file_mozart_async_basic` asserts that the async-parsed John Smith fixture has a phone number containing at least 9 fives:

```python
assert profile["info"]["phone"].count("5") >= 9
```

On at least one run the parser returned `"2555555"` (6 fives), failing the assertion:
```
AssertionError: assert 6 >= 9

  • where 6 = '2555555'.count('5')
    ```

Root cause

The Mozart async parser occasionally returns a truncated phone number for the `john_smith.pdf` fixture. The test treats parser output as deterministic when it isn't.

Suggested fix

  • Loosen the assertion (e.g. `>= 6` or just `bool(profile["info"]["phone"])`), or
  • Use a fixture whose phone format is more reliably extracted, or
  • Mark the test as `@pytest.mark.flaky` with a retry (requires pytest-rerunfailures).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions