Skip to content

Test: test_profile_parsing_file_mozart_async_basic flakes on partial phone output #35

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions