Lightning-AI / Lightning-AI/lightning-thunder

Turn on strict `pytest.mark.xfail`

Open
#305 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.5k
Forks
121
PR merge metrics
No merged PRs in 30d

Description

🚀 Feature

Several tests use pytest.mark.xfail, however, the default behaviour in pytest is that the decorator will still pass if it starts passing. By setting strict=True, the decorator will fail if the test passes

Motivation

Having strict enabled means we notice when the status of xfailed tests change, forcing the devs to keep the test suite up-to-date

Pitch

Enable https://github.com/Lightning-AI/lightning-thunder/blob/main/pyproject.toml#L37

Alternatives

Not do it

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open pyproject.toml at the referenced configuration near line 37 and inspect the existing pytest settings. Run the pytest suite before and after the configuration change, including the tests using pytest.mark.xfail. Done means the project enables strict xfail handling and the test suite reflects that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.