Skip to content

Assert statements in tests are problematic #241

@colidyre

Description

@colidyre

Assert statements with inline if/else blocks in the tests are misleading.

An assert statement like assert response.status_code == 200 if i < 5 else 429 will be evaluated to assert 429 for all i >=5, i.e. the test will be every time green for all requests after the 5th request.

I have already provided a PR to fix this: #240.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions