Skip to content

Allow marking test cases in .test files with -xfail #10604

@pranavrajpal

Description

@pranavrajpal

Feature

Allow marking test cases in *.test files as xfails by adding -xfail to the end of the test name.

Pitch

If someone is adding tests for a feature that hasn't been implemented yet, it's useful to be able to mark it as an xfail so that:

  • the test failing doesn't fail the entire test suite
  • the test is still run so that people can easily notice if the test starts passing as they work on that feature

Adding -skip to the test name achieves the first part, but it's easy to accidentally forget about a test and keep skipping it even after the feature has been implemented if the test is not run regularly.

This came up when writing some mypyc run tests while working on singledispatch support for mypyc, where it was first mentioned in #10589 (comment).

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